function to change the color of a text field

Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

Hi,

I am trying to create in an interactive form (via Acrobat DC).

I would like to employ a mouse on click event to some text (simply to select "AD" and "BC" for a date), on which I intend if user clicks on, then the text will be bold for instance. 

Is there a way to do it without using check box? (ps., I used basic toggle button for instance to test, visually it's okay. BUT when I export "form data" the selection of the button is not exported).

Please see the image I intend to create:

ad-bc.png

TOPICS
Acrobat SDK and JavaScript, Windows

Views

248

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

function to change the color of a text field

Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

Hi,

I am trying to create in an interactive form (via Acrobat DC).

I would like to employ a mouse on click event to some text (simply to select "AD" and "BC" for a date), on which I intend if user clicks on, then the text will be bold for instance. 

Is there a way to do it without using check box? (ps., I used basic toggle button for instance to test, visually it's okay. BUT when I export "form data" the selection of the button is not exported).

Please see the image I intend to create:

ad-bc.png

TOPICS
Acrobat SDK and JavaScript, Windows

Views

249

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 15, 2018 0
Adobe Community Professional ,
Feb 15, 2018

Copy link to clipboard

Copied

What color do you want? Bold is not a color.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

sorry, I correct myself. I would like to switch from light brown to dark brown.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Adobe Community Professional ,
Feb 15, 2018

Copy link to clipboard

Copied

With JavaScript you can set the property textColor of the text field.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

Yes, I imagine so, but I do not know HOW: that is to say I would like to know with with script + event I can fire that event.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Adobe Community Professional ,
Feb 15, 2018

Copy link to clipboard

Copied

You can use a button for this.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

I used basic toggle button for instance to do so, visually it's okay. BUT when I export "form data" the selection of the button is not exported.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Adobe Community Professional ,
Feb 15, 2018

Copy link to clipboard

Copied

You can use a checkbox.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

I'm sorry, but as I specified in my question I would like to do it without checkbox.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Adobe Community Professional ,
Feb 15, 2018

Copy link to clipboard

Copied

Sorry I can't help you.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0
Most Valuable Participant ,
Feb 15, 2018

Copy link to clipboard

Copied

What you're asking for is kind of tricky... One possible way would be to use a button, as well as a (hidden) text field, so the selected value could be exported. When the button is clicked it should change its own appearance setting, as well as set the field's value.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 1
Community Beginner ,
Feb 15, 2018

Copy link to clipboard

Copied

Thank you, a bit multi-tasking, but nice idea. I will try to do so.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 15, 2018 0