Expand my Community achievements bar.

SOLVED

Make TextField visible on radio select

Avatar

Level 2

I'm new to creating forms in LiveCycle, and hardly good at creating the in Acrobat Pro, and am in need of assistance.

In this form I have two radio buttons. I just now got them to work as needed (aternating between one or the other), but i'm looking to add some code. When the user selects the Renew Radio, I want the Memebr ID TextField to become visible, Otherwise the Member ID TextField should remain hidden. I don't know how to code and was hoping someone could help with that.

Also, I'm having a problem with the Member ID TextField. For some reason it's huge. When I try to match it to the size of the radios the text drops from view. Font size is the same for all three on that row. Also, when viewed by the user, Member ID is not at the same line ad the radio options. Can these be fixed? I'm too inexperienced in this and have spent hours trying to hack it.

Thanks for you attention and time,

D

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

I have modified your sample and attached it.

Paul

View solution in original post

5 Replies

Avatar

Former Community Member

Hi,

1. Save your form as Adobe Dynamic XML Form.

1. Select the Membership radio button, in the Binding tab check the 'Specify Item values' Checkbox.

2. Paste the following script to change event of the Membership radio button: (choose Javascript)

     if (this.rawValue=='1')
                MemberID.presence="visible";
                 else  MemberID.presence="invisible";

3.Set the 'Presence' property of the membership radio button to invisible.

4. Select the 'MemberID' field and chage it's hegiht in 'Layout' palette to be smaller.

5. Select the Membership radio button and MemberID field, go to Layout>Align>Vertical Center.

6. Save your form as Adobe Dynamic PDF and preview it.

Yan.

Avatar

Level 2

I'm having trouble with step 3. Where do I find the Presence Property of the Membership radio button and why am I setting the radio button to invisible, shouldn't it be the text field? I've tried finding it, but so far haven't lucked out. Also, When I previewed the document, the text field does not appear on document open, nor does it appear when the Renew membership radio button is selected. What did I do wrong?

Here is the URL: Registration Form

I've also attached the file for a direct look.

Thanks for your time,

D

Avatar

Correct answer by
Former Community Member

I have modified your sample and attached it.

Paul

Avatar

Level 2

Thanks, that works great, but how'd you do it please?

Also, when I put the form to the web, the logo image disappears. Why?

Check it out: Registration Form

Avatar

Former Community Member

1. I put code on the RadioButton group to test its value and show/hide the membership ID field.

2. You had changed the font size for the text in the radio button to 18 pts as well as the text field. The fotn size of the actual radio button itself was left at 10...thats why it looked so bad. I merely changed the font size of all text on the line to 14 (to match the rst of the form), then on the radio buttons I changed the font size of the button (in the object palette under field). Then I resized the ID field to match th eothers.

3. I saved the form as dynamic.

4. Your images are not showing up online because you have a direct reference to them (d:/......). When th eofrm loads on someone elses machine they will not have the same structure as well as the actual image file. To fix this you can either put the image on your web server and use a URL instead of a file reference. Then when the file loads on someone else's machine the biewer will retrieve the image, or you can still point to the one on your hard drive but embed it in the PDF (checkbox below the URL setting).

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----