Hello:
I am building a time card application that includes several (non-repeating) groups, including one for each day the week:
newcardmonday
newcardtuesday
etc.
I have a toggle radio button field that gives the user the option of filling out one set of fields for the entire week OR going through each day.
The form should open with the individual day groups hidden so they can will show only if needed.
The built-in hide/show options (values = 1/2) work okay for the onload and change events, but I would prefer to use custom javascript so I can keep all the event managers in one place. It's kind of painful to have to grind through the GUI especially since I need to use this same method throughout the rest of the form (CRUD, please help me...).
The first group (newcardmonday - with prefix, sul4t_newcardmonday) has a DOM id of 'group10'.
I have tried the load event with:
var sameJob = this.getValue();
if (sameJob == '1') {
document.id('group10').hide();
}
and:
var sameJob = this.getValue();
var group10 = document.id('group10');
if (sameJob == '1') {
group10.hide();
}
not to mention various other ways of grabbing the DOM element with jquery and with Fabrik.getBlock('form_7').formElements etc.
I have had good luck manipulating elements with custom javascript, but I am unable to touch the group DOM object.
If adding an external js file makes more sense, i'm all for that because I also have to build a complex sum calculator that traverses up to 48 fields, so that's the direction I will ultimately head for.
Thanks in advance for your help!
Cheers,
Alan
I am building a time card application that includes several (non-repeating) groups, including one for each day the week:
newcardmonday
newcardtuesday
etc.
I have a toggle radio button field that gives the user the option of filling out one set of fields for the entire week OR going through each day.
The form should open with the individual day groups hidden so they can will show only if needed.
The built-in hide/show options (values = 1/2) work okay for the onload and change events, but I would prefer to use custom javascript so I can keep all the event managers in one place. It's kind of painful to have to grind through the GUI especially since I need to use this same method throughout the rest of the form (CRUD, please help me...).
The first group (newcardmonday - with prefix, sul4t_newcardmonday) has a DOM id of 'group10'.
I have tried the load event with:
var sameJob = this.getValue();
if (sameJob == '1') {
document.id('group10').hide();
}
and:
var sameJob = this.getValue();
var group10 = document.id('group10');
if (sameJob == '1') {
group10.hide();
}
not to mention various other ways of grabbing the DOM element with jquery and with Fabrik.getBlock('form_7').formElements etc.
I have had good luck manipulating elements with custom javascript, but I am unable to touch the group DOM object.
If adding an external js file makes more sense, i'm all for that because I also have to build a complex sum calculator that traverses up to 48 fields, so that's the direction I will ultimately head for.
Thanks in advance for your help!
Cheers,
Alan