Is it possible to set defualt field values from a querystring or any other way? It would be great to be able to pass values from a link of a different page to the form.
Chris, this is possible to do this inside the xslt file but each type of field (select, text, radio, checkbox) will have to be coded individually. Do you have a field type in mind that you want to set the default value from the query string?
I'll use the Text field as an example using some of Josh Reid's code. Inside the <xsl:when test="name() = 'PliableText'"> statement, do something like:
Default field value from querystring
Is it possible to set defualt field values from a querystring or any other way? It would be great to be able to pass values from a link of a different page to the form.
Great work!
If using xslt to display an html form just use:
ie:
Or if using a .Net control, target the asp field at page load and set the text to the querystring:
Or in a Template in [@String key] format, ie:
Think that should about cover it.
Chris, this is possible to do this inside the xslt file but each type of field (select, text, radio, checkbox) will have to be coded individually. Do you have a field type in mind that you want to set the default value from the query string?
I'll use the Text field as an example using some of Josh Reid's code. Inside the <xsl:when test="name() = 'PliableText'"> statement, do something like:
Then, when "defaultValue" is called inside that xsl:when, use $defaultVal instead.
Jon
Awe yes, I see. Thanks!
is working on a reply...