ODBiC Discussion Board

RE: Want to pre-select item on OptionList , Jon Grosse, 04-16-2007

Just set the CustomerID value

by Roger Harris, April 18, 2007 11:51

Your OPTIONLIST will create a <select> input with name="CustomerID", and the form will input a variable with that name. When the <option> list is being created, if any of the values in the list match the current value of $CustomerID$, then that option will be set to "selected" in the list. So, before the OPTIONLIST, just set CustomerID to the value you want preselected (if it isn't already set. This feature was added to make it easier to generate an update form for data that has been read from a database: Any column values that were originally set from an option list will be automatically selected when the list is shown again.)


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.