Jump to content

Insert data on Form/Node selection


Jon Erickson

Recommended Posts

I am building a document model that features the ability to build a template beforehand and then insert it into a new document CKEditor. Within the document form, there is a node selector for choosing the template. How can I observe a selection of the node selector 'documents_template', and on selection, insert text into the editor 'documents_content'? Thanks!

 $form->add(new \IPS\Helpers\Form\Node('documents_template', $this->id ? $this->template : 0, TRUE, array('class' => 'IPS\perscom\Documents\Template', 'subnodes' => FALSE, 'zeroVal' => 'templates_none')));
 $form->add(new \IPS\Helpers\Form\Editor('documents_content', $this->id ? $this->content : NULL, TRUE, array('app' => 'perscom', 'key' => 'Document', 'autoSaveKey' => 'document', 'attachIds' => array($this->id), 'allowAttachments' => TRUE, 'editorId' => 'perscom_editor_document')));

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...