Select list - set required

Select list - set required

by Raphael Goldman -
Number of replies: 4

I have a drop down list.

I have 4 options - the first option is choose from list,

the 3 others are values (1,2,3)

I want to force the user to choose one of the 3 values,

How can I do that?

 

Average of ratings: -
In reply to Raphael Goldman

Re: Select list - set required

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
In reply to Joseph Rézeau

תשובה ל: Re: Select list - set required

by Raphael Goldman -

can I set it directly in:

$mform->addRule('shortname', null, 'required', null, 'client');?