Hi, I have a form with some fields in AppGini. Is any way to disable field2 input (droplist) if I check field1 (checkbox)?
Thank you.
Disable droplist (field2) input if a checkbox (field1) is checked
Re: Disable droplist (field2) input if a checkbox (field1) is checked
Try this code in
hooks/tablename-dv.js
(create that file if it doesn't exist:
Code: Select all
$j(() => {
$j('#field1').on('click', function() {
$j('#field2-container').select2($j(this).prop('checked') ? 'disable' : 'enable')
})
})

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
Re: Disable droplist (field2) input if a checkbox (field1) is checked
Great, it worked! Thank you very much for help!