>load returns to the beginning, I keep the value A or B in dropdown1 but dropdown2 has lost all dynamic list valuesCan you help me please ? :? thanks a lotwydo"> Dynamic dropdown "required" validation - Forums

Forums

Dynamic dropdown "required" validation

wydo 19 Oct, 2014
Hello,

I have a question about dynamic dropdown. I finally managed to use them, but when I want to validate my form I have problems.

Here is an example

dropdown1 :
A=A
B=B
validation=required

dropdown2 :
dynamic data = yes

then I have an event to fill dropdown2 with extra options extension =
A:A1=n/a
B:=Please select, B1=B1, B2=B2

so in this case, if A selected, dropdown2 is not applicable, if B is selected, I show an empty value and they have the choice between B1 & B2

the problem :

if I set dropdown2 to "required", it is giving me an error in all cases (A1, Please select, B1 & B2)
if I don't make any validation, I may face a submit with "Please select" while I want a value
if I go to custom server validation, I can test wether the field is empty or not, but on fail -> >load returns to the beginning, I keep the value A or B in dropdown1 but dropdown2 has lost all dynamic list values

Can you help me please ? :?

thanks a lot

wydo
wydo 21 Oct, 2014
ok I found out.... I think

in a dynamic dropdown, you can't propose a default value. If a default value is proposed, it is not considered as a value and the required validation fails , keeping asking to enter a value. So I added for my list A1 a value A:=Choose,A1=n/a

It's a pity when you have only 1 value, but anyway, chronoforms is a great tools for newbies like me 😀 so I'll cope with it

Thanks
This topic is locked and no more replies can be posted.