Forums

auto populate textarea content from other textarea

emrahsevgi 29 Dec, 2018
Hi;

I have 2 textarea in same form. both of them for adress. How can I pre-fill 2nd textarea based on 1st textarea?

Other question is
How can I make a phone mask for +90(999)999-9999 like textfield' s default Phone mask ?

thaks for your help.
GreyHead 30 Dec, 2018
Hi emrahsevgi,

Which version of ChronoForms are you using?

You can add JavaScript to copy values from one element to another.

Bob
emrahsevgi 30 Dec, 2018
Thank you.
I am using V.6.
Can not we use any placeholder on content box?
GreyHead 31 Dec, 2018
1 Likes
Hi emrahsevgi,

To copy the contents of a textarea you will need to use JavaScript. A common way to do this is to add a checkbox the user can click if the two addresses are the same - you can then use the Events tab of the checkbox to run a JavaScript function.

You can use Placeholder text in a text area using the Placeholder box in the General tab of the element.

Bob
healyhatman 01 Jan, 2019
Also in additional attributes you can add I think
data-inputmask:'mask:+90(99)9999-9999' 
or something like that. There's a FAQ about it.
healyhatman 03 Jan, 2019
Answer
1 Likes
OK so my bad it's
data-inputmask:'mask':'+90(999)999-9999'
A 9 means any digit, an A means any capital letter (lowercase will be converted), a lowercase a means uppercase or lowercase, * means any letter or number.
This topic is locked and no more replies can be posted.