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
BedrockMission!

Learn More

View all

Sign in to view all badges

Need Help with Signature Field

Avatar

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile
_Win_Lam_
Level 2

23-11-2008

Hi.



Can someone kind help me with this:



I have 3 questions with a Yes/No radio button answer.



If all 3 buttons are "No", then i would need to have my signature image as "visible" and another radio button status turned on/selected.



How may i do this? i need serious help......!

Replies

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

24-11-2008

if (radioGroup1.rawValue == "No" && radioGroup2.rawValue == "No" && radioGroup3.rawValue == "No")

{

signature.presence = "visible";



//Note the single '=' here, not the '=='

radioGroup3.rawValue = "Yes";

}

else

{

// Hidden is removed from the layout, invisible is there in the layout but a blank space

signature.presence = "hidden";



//Note the single '=' here, not the '=='

radioGroup3.rawValue = "No";

}



I would put it in the change event for each radio group.

Avatar

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile
_Win_Lam_
Level 2

24-11-2008

Hi Thomas, Thanks for your advice....

I've tried to plot the script and changing it's name values to that of the fields, but it doesn't seem to work.



Can you also explain to me what's the difference between "==" and "="?

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

24-11-2008

"==" is an expression, or a test so will return either true, or false depending on if the test comes back as true (e.g. 1 == 1 returns true, 1 == 2 returns false)

"=" is setting the value of the field and will return true if it manages to set the value (I have several times put in only a single "=" by mistake and spent a long time wondering why it seemed to be doing somethign when it shouldn't)



As for not working, check what the radio groups are returning as their raw values by using:



xfa.host.messageBox("" +radioGroup1.rawValue );



It might be set to associate the radio's with a numerical value (In the Object > Binding tab).



Tom

Avatar

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile
_Win_Lam_
Level 2

24-11-2008

Thanks, Tom.

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

24-11-2008

You're very welcome.



Tom

Avatar

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile
_Win_Lam_
Level 2

24-11-2008

Dear Tom,

May I know if i can set a submit button to print the form at the same time with only 1 button?

1 more question, on the script above, y would we need to include the last script (radioGroup3.rawValue = "Yes";) at the last?

Avatar

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile
_Win_Lam_
Level 2

24-11-2008

Hey Tom!!!! i got it working!!!! thanks! 😛

Avatar

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Win_Lam_
Level 2

Likes

0 likes

Total Posts

33 posts

Correct Reply

0 solutions
View profile
_Win_Lam_
Level 2

24-11-2008

I've even got the print solution done!!! Thanks! 🙂

Avatar

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 4
Thomas_McConnac
Level 4

Likes

2 likes

Total Posts

134 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Thomas_McConnac
Level 4

25-11-2008

Hey Win,



Setting the (radioGroup3.rawValue = "Yes") was what I thought you wanted it to do. Maybe you just wanted to make that visible too? 🙂



Glad you got it working,



Tom