Not able to pre fill value in text input stored in defaults

I have stored a value in defaults which I want to pre fill in the editor but it doesn't show up.

    defaults: {
      name: { value: "" },

      hs_Timezone: { value: "" },
      hs_IP: { value: "12345" }, //not shown in editor


This is the html code:

      <div class="form-row">
        <label for="node-input-hs_IP"><span> IP</span></label>
          style="width: 250px;"

You will need to use oneditprepare to test if the value is empty and add it to the UI with jQuery.

It should apply for any newly added instance of the node, but it will not apply for existing instances of the node.

The defaults only get applied when the node is added to the workspace. Otherwise you have to, as Julian says, add some logic to oneditprepare to ensure it gets applied.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.