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')
})
})
AppGini plugins to add more power to your apps:
- 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
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Disable droplist (field2) input if a checkbox (field1) is checked
Great, it worked! Thank you very much for help!