Prefill form-field - Joomla! Forum - community, help and support


hi,

i working on little mail-part of component. in edit-view there's editor, used format email.

well, add list-field different possible signatures. if click on signature, signature should filled editor.

is possible?

yes, via javascript. e.g. if dropdown has id="signature" , textarea has id="message" you'd akin to:

msg = document.getelementbyid('message');
sig = document.getelementbyid('signature');
sigtxt = sig.options[sig.selectedindex].value;
msgtxt = msg.value;
newmsg = msgtxt + "\n--\n" + sigtxt;
msg.value = newmsg;

you'd put function called via select's onchange.





Comments

Popular posts from this blog

Joomla 3.3 Installation Error message - Joomla! Forum - community, help and support

Multilanguage infinite redirect loop error. - Joomla! Forum - community, help and support

Thread: Wine can't find the cd