Automatically set checkbox when dropdown value changed

kootjoo

Member
Hi,

I have a form with a drowpdown with email addresses and I have in the form a checkbox.

What I want is that when user selects value from dropdown and saves the checkbox is automatically checked. It must also work when using the inline edit plugin.

Is this possible?

Thanks,
KooTjoo
 
I don't know about getting that to work with the inline edit plugin. The design of that plugin is such that it is only editing one element's value at a time. Rob may have some ideas on that, but I don't.

For the form, you should be able to do it with a little custom JS in a JS event on the dropdown element.

If you csn give me the full element names of the dropdown and checkbox, and the value you want to set the checkbox to, I'll give you some code.

Do you want to set the checkbox to the same value, regardless of what email is chosen from the dropdown? So selecting anything but the "Please select ..." from the dropdown will set the checkbox to one specific value?

I'll also need to know what you use as value for the "Please select ..." on the dropdown (like is it 0, or a blank string, etc).

-- hugh
 
You might have been able to use a PHP form plugin to check the value of the dropdown and update the checkbox value. Form plugins are triggered when the inline edit plugin saves an entry.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top