The CreatorCon Call for Content is officially open! Get started here.

How to make select box(dropdown field) choices picked instead of none

RudhraKAM
Tera Guru

Hi

I have a requirement, where when the user need to select   one option from the dropdown   and that is a mandatory field .   for instance

the field name is   Field

and the list of choices are A,B,C default is none

none should be displayed when the form load and user should not be able to   submit the form without selecting some option ,the issue which I am facing is even I didn't select any option I am able to submit it and in the   user end the field option is marked as select .can some one help me with that

Untitled.png

1 ACCEPTED SOLUTION

Abhinay Erra
Giga Sage

Check the Include none checkbox


View solution in original post

14 REPLIES 14

Let me know if this has answered your question. If so please mark my response as correct so that others who have same question can find the answer quickly.


Hello Abhinay



it worked fine and instead of none   ,, how to replace the none with select , if I entered default value as select , it is showing in the choice field , I rather want   choice field default value as select and options as a or b or c when its mandatory it should not allow the user unless he select some choice


What do you mean by select? You want a choice to be labelled Select instead of None?


Yes


Well in that case, you need to uncheck the checkbox include none and create a new choice Select. Then you need to have a onSubmit client script which validates if the choice field is filled or not. Your onSubmit client will look like this



function onSubmit() {


  if(g_form.getValue('your choice variable name')=='your slecet choice value'){


  alert("please select an option");


  return false;


  }


}