Adobe Livecycle Designer ES2
HI,
I have several checkboxes that I need to make a check all option for. I have it working but it's inneficient and time consuming given the number of times this has to be done. I need like 5 of these per page, 20+ rows per page, 10 pages per document, and about 7 documents total :S
On click event of the checkbox has the following code:
if (this.rawValue == '1')
{
form1.facility.Table6.Row2.Subform7.pharmacy1.rawValue = '1';
form1.facility.Table6.Row3.Subform7.pharmacy2.rawValue = '1';
<....>
}
else
{
form1.facility.Table6.Row2.Subform7.pharmacy1.rawValue = '0';
form1.facility.Table6.Row3.Subform7.pharmacy2.rawValue = '0';
<....>
Solved! Go to Solution.
Views
Replies
Total Likes
You must be using formCalc and the rows must be reNamed so that LCD shows them as Row[0], Row[1], Row[3] ... etc. in the Hiearchy tab
I am a little confused by the subform residing within a table row--although it is possible to do this. So, I assume that this is correct. One good way to make sure you have the correct SOM for the checkbox is to CTRL click one of these checkboxes while your cursor is in the Scrpt Editor.
Good luck!
Views
Replies
Total Likes
Hi,
The way I handle this is to use formCalc and name the checkboxes the same (I've used generic names here).
subform[*].table[*].row[*].checkbox = "1"
This will set all the checkboxes. Play around with it and see if something like this will work.
Or, you could construct a nested loop in javaScript or formCalc and that would decrease the number of lines needed.
Good luck!
Stephen
Views
Replies
Total Likes
Hi,
I am getting the following error:
Error: accessor 'form1.facility.Table5.Row[*].Subform7.facility1' is unknown.
Here's the code I wrote:
form1.facility.Table5.Row[*].Subform7.facility1 = "1"
Thanks.
Views
Replies
Total Likes
You must be using formCalc and the rows must be reNamed so that LCD shows them as Row[0], Row[1], Row[3] ... etc. in the Hiearchy tab
I am a little confused by the subform residing within a table row--although it is possible to do this. So, I assume that this is correct. One good way to make sure you have the correct SOM for the checkbox is to CTRL click one of these checkboxes while your cursor is in the Scrpt Editor.
Good luck!
Views
Replies
Total Likes
Alrighty, after a re-naming nightmare I now have something that's more or less copy + pastable. Thanks for the help.
if (form1.facility.Table5.checks.subform[3].CheckAll == "1") then
form1.facility.Table5.Row[*].Subform7.facility = "4"
form1.facility.Table5.checks.subform[*].CheckAll = "0"
form1.facility.Table5.checks.subform[3].CheckAll = "1"
else
form1.facility.Table5.Row[*].Subform7.facility = "0"
form1.facility.Table5.checks.subform[*].CheckAll[*] = "0"
endif
Views
Replies
Total Likes
Hint: You can rename multiple like objects (multiple rows or multiple checkboxes, etc) by highlighting them in the Hiearchy Pallet and changing the name in the Binding tab of the Object Pallet--change them all at once.
Thanks,
The subform is in place to allow easier positioning of all the checkboxes (5 per row).
What I do is join the cells into one, paste the subform, then break the cells apart again and reapply the border.
It lets me paste a subform into one cell while maintaining the checkbox positions and it doesn't stretch the table. I have a border around the other 4 cells which surround the checkboxes making a nice little box around the checkboxes.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies