Setting field value using javascript in Public Form

Hi

I would like to to set a form field’s default value at runtime after the form is loaded.
I looked at javascript examples in other topics, but I could not make it work.

Is it possible to do it in the snippet

<script type="text/javascript" src="https://forms.plumsail.com/widget/1.0.6/app.js"></script>
<div id="plumsail-form"><div class="fd-form-loading"></div></div>
<script type="text/javascript">
var fd = new Plumsail.Form("#plumsail-form", "b470c966-c02c-47c0-b6b9-2d665b8751a5");
'CAN I ADD IT HERE? HOW?
</script>

Thank you

Figured it out, I should use .rendered() and not .spRendered()… :slight_smile:

Dear @BentCazperKjeldsen,

I’m glad you’ve solved it!