Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

CheckBox Circle with no fill?

Avatar

Level 1

My form has Yes / No option on it and typically users will circle one or the other when they print the blank form.  I know I could change this to a regular check box, radio button, etc.  However, before I do, I thought if you all knew a way to us the form in its current state?  One potential way I though of is to use a checkbox with a very large font size and the circle style.  Works great but the circle has black fill and I need it to be no fill (transparent). I thought I could use a script to change the fill color of the circle, but I'm a total newbie at scripting here and nothing I've come up with is working.

Any ideas?

Thank you!

17 Replies

Avatar

Level 2

Add a circle object to your form and when the user selects Yes or No have the circle appear using Javascript.  To have the circle appear type,

Circle1.presence

="visible" and to have the circle disappear type Circle1.presence="hidden"

Avatar

Former Community Member

Thank you for the reply.  What version of Adobe are you using?  I think I investigate this approach (using Javascript) attached to the circle.  But all the documentation I found says that objects like a circle can not have scripts associated with them.

Maybe its a version thing?

Avatar

Level 2

I'm using LiveCycle Designer 9.  You're right Circle objects can not have Javascript directly but other objects can reference them.  For example, in a radio button's click event there could be Javascript, Circle1.presence="visible" or Circle1.presence="invisible".

I hope this helps.

Avatar

Former Community Member

Yep - that is what I figured out yesterday.  I now have radio buttons with javascripts attached to them to control the circle.  I've made the font for the radio buttons match the background so that are "invisible" to the user but just can not figure out how to make the radio button itself "disappear".  Almost there though.

Thank you!

Avatar

Level 2

I'm glad everything is working.

Inorder to get radio buttons to disappear I use:

xfa.resolveNode("ParentNode.ChildNode").presence="invisible"

Thank you

Avatar

Former Community Member

I tried making the radio buttons invisible - but that unfortunately makes tham also "unclickable" 

Avatar

Level 2

I have one more idea.  Instead of using radio buttons use a regular button and remove all the formatting to look more like plain text.  On the click event of the button show or not show the circle.

Good luck.

Avatar

Former Community Member

That's the ticket!!! 

Actually, I left the caption in there so my user will be clicking on the "Yes" or "No" button to draw the respective circle around their response!

Woohoo!

Thank you and have a fabulous weekend.

- Kris

Avatar

Level 2

That's perfect.  Have a great weekend too.

Avatar

Level 1

This worked for me and still works on the form I created back then.

However, I'm trying to recreate this "feature" on a new form and it's not working. I've created the buttons, circles and associated scripts. When I click on the button nothing happens! I'm trying to remember if there is something I had to do to allow the circle properties to be dynamic. Any ideas??

Avatar

Level 1

Just a bit more information on my current problem.  I can get the script associated with the button to control attributes of the button itself. However, I can NOT get the script associated with the button to control attributes of other items in the form!  Does that make sense to anyone??

Thank you!

Avatar

Level 2

Check the hierarchy palette in designer to double check the button is in

the same level as the other items on your form.

From: flgal3fll <forums@adobe.com>

To: dennis gill <dennis.l.gill@clev.frb.org>

Date: 01/18/2011 06:00 PM

Subject: CheckBox Circle with no fill?

Just a bit more information on my current problem. I can get the script

associated with the button to control attributes of the button itself.

However, I can NOT get the script associated with the button to control

attributes of other items in the form! Does that make sense to anyone??

Thank you!

Avatar

Level 1

:-(  Hierarchy is flat on this form.  All shapes, text, circles, etc. are on the same level.

I have two buttons, ButtonY and ButtonN and one circle at this point.

The script for ButtonY is:

----- topmostSubform.Page1.ButtonY::click: - (JavaScript, client) ----------------------------------

xfa.form.topmostSubform.Page1.ButtonN.fontColor="255,0,0"
xfa.form.topmostSubform.Page1.Circle1.presence="invisible"

For ButtonN:

----- topmostSubform.Page1.ButtonN::click: - (JavaScript, client) ----------------------------------

xfa.form.topmostSubform.Page1.ButtonN.fontColor="0,0,0"
xfa.form.topmostSubform.Page1.Circle1.presence="visible"

Both buttons and the circle are on the same level under Page1.

The fontcolor of ButtonN changes as expected when each button is pressed.  The circle (with a default presence of visible) never becomes invisible when ButtonY is clicked.

Very frustrating.  Everything seems exactly the same as on the form this works on.  I haven't changed version of Lifecycle or anything.

Avatar

Former Community Member

Is the form saved as a dynamic form or a static form. I think it might have to be dynamic for your solution to work.

Paul

Avatar

Level 1

AHA!!!!  That is the ticket!!  Thank you, thank you, thank you!!!

A form has to be dynamic for other abject in the form to be manipulated then??  Or for scripts to work on other objects?

Now I can stop pulling my hair out and try to put some back in my head. 

Thank you again!  Have a great day.

Avatar

Former Community Member

Just a point of clarification -  a form has to be dynamic for the changes in appearance to be displayed ...this allows the form to be re-drawn as required.

Paul