I want to hide a bunch of fields when someone selected "No" from a radio group. I'm trying to put all the fields that are to be hidden into the same "Element(s) identifier" setting instead of creating a new event for each one. Is that possible? I tried putting # in front of each element and putting a comma after each ID. It never hides anything after the first element or ID that's defined.
Forums
Hiding multiple fields with the Element(s) identifier setting on the events tab of an element
Each element needs to be on a new line.
Note to Max : you very much need to make that clear in the UI
Note to Max : you very much need to make that clear in the UI
[blockquote[li]Each element needs to be on a new line.[/blockquote][/li]
That works in CFv6. In CCv6 the Element(s) identifier field doesn't allow multiple lines.
Using events in a dropdown is throwing a jQuery error too:
TypeError: invalid 'in' operand e The culprit code is the 2nd line in the below code from g2.forms.js: var event_targets = ;
jQuery.each(event['identifier'], function(idi, ident){
if(ident.substring(0, 1) == '#' || ident.substring(0, 1) == '.' || ident.substring(0, 1) == '['){
event_targets = jQuery.merge(event_targets, jQuery(ident));
}else{
event_targets = jQuery.merge(event_targets, jQuery(':input[name="' + ident + '"]'));
if(jQuery.inArray('function', event.action) > -1){
event_targets = [ident];
}
}[br] });
I found out that the attributes related to the events are different when using the Fields controls or the Form - Fields controls:
In the Form - Fields controls event you can select only one action at a time.
Does that make any difference?
maxx
jQuery.each(event['identifier'], function(idi, ident){
if(ident.substring(0, 1) == '#' || ident.substring(0, 1) == '.' || ident.substring(0, 1) == '['){
event_targets = jQuery.merge(event_targets, jQuery(ident));
}else{
event_targets = jQuery.merge(event_targets, jQuery(':input[name="' + ident + '"]'));
if(jQuery.inArray('function', event.action) > -1){
event_targets = [ident];
}
}[br] });
I found out that the attributes related to the events are different when using the Fields controls or the Form - Fields controls:
[{"sign":"=","action":["show"],"identifier":".aClass"}...]
{"sign":"=","value":"aValue","action":"disable_validation","identifier":"cd"}In the former the action is an array, in the latter it is a string.
In the Form - Fields controls event you can select only one action at a time.
Does that make any difference?
maxx
This topic is locked and no more replies can be posted.