Page 1 of 1

Remove a value from a dropdown

Posted: 08 Apr 2016
by Dars
Hello,

I'm trying to remove a value from a dropdown on a User-defined rule edit form.
I add the following javascript code:
$("#Statut option[value='Fermé']).Remove;

"Statut" is my sharepoint list field.
It's not working. What am I doing wrong?
Thank you!

Re: Remove a value from a dropdown

Posted: 11 Apr 2016
by rostislav
Hello,

Code: Select all

fd.field('Statut').control()._el().find('option[value="Fermé"]').remove();
Statut needs to be the internal name.

Re: Remove a value from a dropdown

Posted: 12 Apr 2016
by Dars
Awesome, thanks!