Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Script behind button not working on FormGuide

_James_J_Gallag
Level 3
Level 3
Hi,



I have created a simple xdp that has a button and a checkbox. Behind the buttons click event I have the following:



xfa.form.memberForm.checkBoxName = "1";



When I do a preview pdf and click the button the check box gets set as I want. But I have created a form guide and added by button and check box to the form guide and when i do a Preview of the Form Guide and click the button nothing happens!



I'm pretty new to all this so hopefully someone can point me in the right direction.



Thanks,

James
5 Replies
pguerett
Level 10
Level 10
You need to add the rawValue property to the expression. So it should look like this:



xfa.form.memberForm.checkBoxName.rawValue = "1";
_James_J_Gallag
Level 3
Level 3
Hi Paul,



Thanks for your reply.



I tried your suggestion but it still doesn't work in the form guide unfortunatly. It does work when I do a previef pdf in the Designer view though.



James
pguerett
Level 10
Level 10
Can you post your XDP to livecycle8@gmail.com and I will have a look.
_James_J_Gallag
Level 3
Level 3
Paul,



Sent that onto that address there now, thanks.



James
_James_J_Gallag
Level 3
Level 3
With the help of Paul (thanks again) we managed to get this issue resolved.



The script behind the button was marked as FormCalc. FormCalc is not supported in Form Guides so by changing the dropdown to javascript and using the correct javascript code I was able to set the check box on the Form Guide.