Hi
I have a checkbox group and based on multiple choices some fields should appear, but it seems to not work:
only if I select one of the checkbox group option it work.
Is it possible to make visible some fields based on multiple checkbox choices using the built-in Event switcher?
Thanks
Giulia
I have a checkbox group and based on multiple choices some fields should appear, but it seems to not work:
only if I select one of the checkbox group option it work.
Is it possible to make visible some fields based on multiple checkbox choices using the built-in Event switcher?
Thanks
Giulia
Hi Guilia,
Not with the built in events tab, you'd need to use custom Javascript to do this.
Bob
Not with the built in events tab, you'd need to use custom Javascript to do this.
Bob
Hi Giulia,
What exactly do you need to do? What are the IDs of the elements that are involved?
Bob
What exactly do you need to do? What are the IDs of the elements that are involved?
Bob
I have several products (PcVue, WebVue, Dream Report...):
if the user select PcVue or WebVue (or both) PcVue version number field will appear.
If the the user select Dream Report, Dream report version nember field will appear
Hope it is clear
if the user select PcVue or WebVue (or both) PcVue version number field will appear.
If the the user select Dream Report, Dream report version nember field will appear
Hope it is clear
Hi Giulia,
No, "exactly" means just that - and 'Dream Report' can't be an element ID as it has a space in it.
What are the IDs of the elements in your form that are involved in these events?
Bob
No, "exactly" means just that - and 'Dream Report' can't be an element ID as it has a space in it.
What are the IDs of the elements in your form that are involved in these events?
Bob
Indeed they are the name of fields not the ID.
Below the IDs:
CHECKBOX GROUP NAME and ID: solutions
Options:
PcVue = PcVue
WebVue = WebVue
Webscheduler = Webscheduler
TouchVue = TouchVue
Dream Report = Dream Report
Alert = Alert
IntraVUE = IntraVUE
Enterprise Historian = Enterprise Historian
Other = Other
CONDITIONS:
If the user ticks PcVue, WebVue, TouchVue or WebScheduler then following fields should appear (IDs):
pcvue_version
protocol
build_number
If the user ticks Dream Report, IntraVue, Alert or Enterprise Historian then following fields should appear (IDs):
version
If the user ticks other then following fields should appear (IDs):
product_name
version
Is it clear now?
Below the IDs:
CHECKBOX GROUP NAME and ID: solutions
Options:
PcVue = PcVue
WebVue = WebVue
Webscheduler = Webscheduler
TouchVue = TouchVue
Dream Report = Dream Report
Alert = Alert
IntraVUE = IntraVUE
Enterprise Historian = Enterprise Historian
Other = Other
CONDITIONS:
If the user ticks PcVue, WebVue, TouchVue or WebScheduler then following fields should appear (IDs):
pcvue_version
protocol
build_number
If the user ticks Dream Report, IntraVue, Alert or Enterprise Historian then following fields should appear (IDs):
version
If the user ticks other then following fields should appear (IDs):
product_name
version
Is it clear now?
That seems like something you could do with the Events
https://www.chronoengine.com/forums/posts/t103960/chronoforms-v6-hiding-and-showing-a-text-box-based-on-a-certain-value-in-a-dropdown.html
You just need to make a whole bunch of events, for each option. Or make a custom javascript function to do it.
https://www.chronoengine.com/forums/posts/t103960/chronoforms-v6-hiding-and-showing-a-text-box-based-on-a-certain-value-in-a-dropdown.html
You just need to make a whole bunch of events, for each option. Or make a custom javascript function to do it.
Please read my post description: in dropdownbox group the Events don't work properly
Hello
Any news?
I would to know if I have to look for a different solution
Thanks
Any news?
I would to know if I have to look for a different solution
Thanks
Kindly it is possible to recive an answer (negative or positive) as I need to find a solution or altenrnatives
Thanks
Thanks
Hi giulia72,
I built a little test form here. This is using the following JavaScript in a Load JavaScript action with the IDs and options you gave. The logic doesn't work cleanly with a Checkbox group - I suspect that you may need Radio Buttons here.
Bob
I built a little test form here. This is using the following JavaScript in a Load JavaScript action with the IDs and options you gave. The logic doesn't work cleanly with a Checkbox group - I suspect that you may need Radio Buttons here.
jQuery(document).ready(function(jQ){
jQ('#fin-solutions input').on('change', function(){
var option, option_value, option_checked;
option = jQ(this);
option_value = jQ(this).val();
// console.log(option_value);
option_checked = jQ(this).prop('checked');
// console.log(option_checked);
if ( option_value == 'PcVue'
|| option_value == 'WebVue'
|| option_value == 'TouchVue'
|| option_value == 'WebScheduler' ) {
if ( option_checked ) {
jQ('#form-row-pcvue_version').show();
jQ('#form-row-protocol').show();
jQ('#form-row-build_number').show();
} else {
jQ('#form-row-pcvue_version').hide();
jQ('#form-row-protocol').hide();
jQ('#form-row-build_number').hide();
}
} else if ( option_value == 'Dream Report'
|| option_value == 'IntraVue'
|| option_value == 'Alert '
|| option_value == 'Enterprise Historian' ) {
if ( option_checked ) {
jQ('#form-row-version').show();
} else {
jQ('#form-row-version').hide();
}
} else {
if ( option_checked ) {
jQ('#form-row-product_name').show();
jQ('#form-row-version').show();
} else {
jQ('#form-row-product_name').hide();
jQ('#form-row-version').hide();
}
}
});
});
Bob
in your test it seems to work except for Webscheduler (I don't know why as your code seems to be correct.
Where do I have to insert Load javascript ? after HTML render?
I need a checkbox group because the user could select several options
Where do I have to insert Load javascript ? after HTML render?
I need a checkbox group because the user could select several options
Hi Guilia72,
I have Webscheduler in the options and WebScheduler in the JavaScript - they both need to match up.
The Load JavaScript action needs to be *before* the HTML (Render form) action.
You'll need to carefully think through which inputs you need to display to have this work with a CheckBox group - the logic I have written from your post may not handle all the combinations correctly.
Bob
I have Webscheduler in the options and WebScheduler in the JavaScript - they both need to match up.
The Load JavaScript action needs to be *before* the HTML (Render form) action.
You'll need to carefully think through which inputs you need to display to have this work with a CheckBox group - the logic I have written from your post may not handle all the combinations correctly.
Bob
This topic is locked and no more replies can be posted.