I am looking for assistance in the following.
When creating or editing a record I would like to hide certain fields after a particular selection
EG
among others there are the following fields
varchar - multi select field 'position', Required selection are 'secretary' and 'captain'
varchar - 'dates'
varchar - 'time'
text - 'comments'
What is required is if 'secretary' is selected hide 'dates' and 'time' and show all other fields
if captain is selected hide 'comments' and show all other fields
pseudo code.
if position = secretary then hide 'dates' and 'time' else hide 'comments'
thank you in anticipation
Barry
conditional show / hide
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: conditional show / hide
Hi Barry,
have a look here. Is this what you need?
https://forums.appgini.com/phpbb/viewto ... 8934#p8550
Feel free to contact me in case you need support.
Regards,
Jan
https://www.bizzworxx.com
have a look here. Is this what you need?
https://forums.appgini.com/phpbb/viewto ... 8934#p8550
Feel free to contact me in case you need support.
Regards,
Jan
https://www.bizzworxx.com
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: conditional show / hide
Thank you Jan,
I will see if I can, hopefully, adapt the code to my requirements,
Barry
I will see if I can, hopefully, adapt the code to my requirements,
Barry
Re: conditional show / hide
Code: Select all
jQuery(function(){
jQuery('#position-container').on('change', function() {
if(jQuery('#department-container').val() == 'secretary'){
$j('#dates').parents('.form-group').hide();
$j('#time').parents('.form-group').hide();
}
else {
$j('#comments').parents('.form-group').hide();
};
});
});