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

Change Font Size in Placeholder

New Here ,
Sep 25, 2019 Sep 25, 2019

I have the following problem. I want to make a Textfield with a placeholder with textSize = 8. But when the user starts typing the cursor it has to grow to a textSize = 10.
I have used the script in format

if (event.value == "")
{
event.target.textSize = 8;
event.value = "Placeholder";
}
else
{
event.target.textSize = 10;
}

I have also used the activate field action and have put the following:
var field1 = this.getField ("Text1");
field1.textSize = 10;
But it does not work. the size does change but when I click outside the textfield. However,  I want it to change when the user starts typing in it

Thanks for the ideas

177
Translate
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
no replies

Have something to add?

Join the conversation