This topic is locked
[SOLVED]

Drop down list auto selected first value

8/11/2022 7:25:39 AM
PHPRunner General questions
S
Sayed author

On Add page, dropdown list should be auto selected first value instead of Select.
Please guide. Thanks

Admin 8/11/2022

You can do this with the help of Javascript. Check this Stackoverflow post for inspiration.

M
macalister 8/11/2022

Hi.

You can try assign the field value on Process record values event.

$values["field"] = "Option1";
S
Sayed author 8/12/2022

Could you please test it at your end. Its simple drop down on add page. Want first option auto selected instead of "Please select".
I tried tons of things but nothing is working.

S
Sayed author 8/13/2022

Finally found the solution already covered by Admin.

$("select[id^='value_FIELD'] option[value='']").remove();

Write your field name, instead of FIELD.