Validation of control inside repeater on submit based on dropdown selection


Badge +6

Hi Team,

 

I have 2 panels in the form and based on drop down selection i am showing and hiding the panels.

Drpo down values : Host Based

                                Control Based

In one panel i have a  single line of text controller inside the repeater. i want this single line of text inside the repeater to be mandatory only on host based selection in drop down. 

 

I tried adding the rule but it is not working, Please help me in achieving this.

 

Thanks in advance,

Hema


2 replies

Userlevel 5
Badge +14

your validation rule formula should look like

 

DropDownNamedControl == "Host Based" && IsNullOrEmpty(SingleLineTextNamedControl)
and(equals(DropDownNamedControl,"Host Based"),IsNullOrEmpty(SingleLineTextNamedControl))

(assumes drop down is a choice control)

Badge +6
Hi Emha,

Thank you ! that helped me. I was using the same rule but was taking the itemcontrol instead of named control.

Regards,
Hema

Reply