• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

function to change the color of a text field

Explorer ,
Feb 15, 2018 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

757

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
community guidelines
Community Expert ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Explorer ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Explorer ,
Feb 15, 2018 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.

Votes

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
community guidelines
Community Expert ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

You can use a button for this.

Votes

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
community guidelines
Explorer ,
Feb 15, 2018 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.

Votes

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
community guidelines
Community Expert ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

You can use a checkbox.

Votes

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
community guidelines
Explorer ,
Feb 15, 2018 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.

Votes

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
community guidelines
Community Expert ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

Sorry I can't help you.

Votes

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
community guidelines
Community Expert ,
Feb 15, 2018 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.

Votes

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
community guidelines
Explorer ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

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
community guidelines