ken
August 12, 2019, 7:03pm
1
Site: classic asp
Database: MSSQL
I have a form with a select and a hidden input as follows:
If select = x, the input is displayed and I want the input field required
if select <> x, the input will remain hidden and it can’t be required
Show and hide is working fine, just need help with validation only when the field is visible. Thanks!
scott
August 12, 2019, 7:08pm
2
@ben 's solution might help you out.
I put a select field in a form with text values as choices in the table with one of the choices being “Other”.
I have another field which I’d like to have appear when a user selects “Other” in the select field.
I tried a dynamic attribute of show to the value of the select field. That doesn’t seem to work for me. Is that the right way to do this?
Thanks,
Rick
ken
August 12, 2019, 8:02pm
3
Thanks Scott, I have the show and hide function working fine, just need help with the validation
scott
August 12, 2019, 8:21pm
4
@ken ,
When you say validation, are you talking about the app connect side or the server action side?
ken
August 12, 2019, 8:42pm
5
Just want it required on the app connect side, if select = x, then I want them to be required to fill out the input. Does that make sense?
Ken, have you tried making the form elements disabled (in addition to hiding them) ?
I’m struggling myself with my first form validation implementation.
This seems to do the trick for me and client side validation seems to work fine.
(But I still get “required” errors on the server side.
EDIT : fixed, the “import” form feature put variables in POST but my form was configured with GET variables.)
ken
August 15, 2019, 6:28pm
7
Great Idea, i will try that. Thanks