When attempting to set a default value for a new TextBox item, during form edit, I found that the value was always being over written.
The code for rendering the textbox element:
case “text” :
elem = document.createElement(“input”);
elem.type = “text”;
$(elem).attr(options);
elem.value = vl;
break;
has the side effect of over-riding the value
however, if you reverse the last two lines before the break:
elem = document.createElement(“input”);
elem.type = “text”;
elem.value = vl; /*This has been moved to before applying the options */
$(elem).attr(options);
/*This now over rides the default   and sets the value:[default value] as supplied in the edit options.
Can you switch these lines in future releases?
break;
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top