Javascript and field value

dimna 16 Sep, 2015

I want to show the result of a javascript as default value in a text box.
If I put this in a custom field everything is displayed.
So the script is ok.
If I put this in as field value in a text box I only see the code as string…

How is it possible to save this value in a $form->data[value]? Perhaps with ajax?

Kind regards
GreyHead 16 Sep, 2015
Hi Astrid,

Please try something like this in a Load JavaScript action to set the value of a text element:
jQuery(document).ready(function (jQ) {
  var result;
  result = myFunction();

This topic is locked and no more replies can be posted.