I am using a form to populate K2 items.
The record has introtext and "extra fields" which are concatenated:
First version: use a text area to input the extra fields (it works)
and javascript to concatenate the fields
But when I change the input to an editor pane:
there is nothing to trigger the javascript.
I tried the suggestions from other posts in the forum but cant get it to work.
So how do i get the equivalent of onChange="updatethis(this.form);" with the editor pane?
Note: an editor pane works for introtext because the editor name matches the field name in the record.
Thanks!
The record has introtext and "extra fields" which are concatenated:
[{"id":"1","value":"<some text>"},{"id":"2","value":"<some other text>"}]
First version: use a text area to input the extra fields (it works)
<textarea class="cf_inputbox" rows="3" id="text_9" title="" cols="30" name="literacy" onChange="updatethis(this.form);"></textarea>
and javascript to concatenate the fields
function updatethis(form) {
form.elements['extra_fields'].value = '[' + '{"id":"1","value":"' + form.elements['literacy'].value + '"},' + '{"id":"2","........
But when I change the input to an editor pane:
<?php
$editor =& JFactory::getEditor();
echo $editor->display( 'literacy', '', '80%', '350', '55', '20', true ) ;
?>
there is nothing to trigger the javascript.
I tried the suggestions from other posts in the forum but cant get it to work.
So how do i get the equivalent of onChange="updatethis(this.form);" with the editor pane?
Note: an editor pane works for introtext because the editor name matches the field name in the record.
Thanks!