[ic] Weird form dropdown problem

Peter peter at pajamian.dhs.org
Wed Sep 26 19:37:09 EDT 2007


On 09/26/2007 11:46 AM, Davor Ocelic wrote:
> Hey folks, here's the situation:
> 
> I have an HTML form on a page that contains 4 dropdowns and one of them
> is having a problem.
> 
> Of those 4 dropdowns, 2 are required. For both of them, I have
> NAME=required  in the form profile check.
> 
> If you leave either one of the two empty, you get a proper error message and
> the page does not let you continue until you fill them in. (So far so good).
> 
> However, if you DO fill the dropdowns and move to the next page, and then 
> click "Back" in your browser, 2 non-required and 1 required dropdown
> retain their value as you'd expect and behave properly. BUT the 
> last (4th and required) dropdown resets its value to no value:
> There is an [error] field just beside it which prints the
> "Not filled in..." error message and the value is visibly empty.
> 
> What's even more confusing, even though it told you the field was
> empty, you can click the submit button again and the profile check
> does not complain about the missing field - it lets is pass.
> 
> 
> I've tried replacing =required with =mandatory and it still lets
> the form pass after clicking "Back" in the browser and then "Submit"
> even if the field is visibly empty.
> 
> I'd appreciate your insight.
> 
> 
> Here are the relevant parts:
> 
> 
> On the top of the page, I have:
> [update values]
> 
> 
> Profile check defined with [set]:
> f1_id=required
> f2_id=required    <-- this one isn't working
> 
> 
> The dropdown code is (Note that the same dropdown code except for 
> different name works well just above this):
> 
> <tr>
> 
> <td align="right">
> [error name=f2_id std_label="Your group:" required=1]
> </td>
> 
> <td>
>   <select name="f2_id">
>     <option value="">Please select your group:</option>
>     
>     [tmp sql] ... SQL QUERY... [/tmp]
>     [query sql="[scratch sql]" list=1 ]
>     [list]
>       <option value="[sql-param id]" [selected f2_id [sql-param id]]>
>       	[sql-param name]
>       </option>
>     [/list]
>     [/query]
>   </select>                   
> </td>                       
> </tr>  

What do you get from <!-- [value f2_id] --> ?

Peter


More information about the interchange-users mailing list