Setting default value for Dynamically added fields in Editor form

Setting default value for Dynamically added fields in Editor form

kaustubh.agrawal2000kaustubh.agrawal2000 Posts: 88Questions: 39Answers: 2

Hi
I am trying to add some fields dynamically to the editor form and it works correctly for new entries like below

editor.add({
  'label' : ctf.field_name,
  'name'  : name
});

But when I try and add / update value for the same field like below

editor.field(name).update(ctf.field_value);

I am getting error like

common.js:260 Uncaught TypeError: editor.field(...).update is not a function

BTW, my field name is "ctf.2" if that is the problem.

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.