Hi,
I am trying to make a simple article submission form. I can get it to work with a simple title and text-area.
But i want the text-area to be a rich field with a wysiwyg editor. Therefore i selected WYSIWYG editor: Yes in the textarea options. But when i check the form it still shows me a normal textarea with no editor ..
This is the form code:
<div class="form-group gcore-form-row" id="form-row-submit_button"><div class="gcore-input gcore-display-table" id="fin-submit_button"><input name="submit_button" id="submit_button" type="submit" value="Submit" class="btn btn-default form-control A" style="" data-load-state="" /></div></div><div class="form-group gcore-form-row" id="form-row-title"><label for="title" class="control-label gcore-label-left">Title</label>
<div class="gcore-input gcore-display-table" id="fin-title"><input name="Title" id="title" value="" placeholder="" maxlength="" size="50" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-content"><label for="content" class="control-label gcore-label-left">Content</label>
<div class="gcore-input gcore-display-table" id="fin-content"><textarea name="Content" id="content" placeholder="" rows="3" cols="40" class="form-control A" title="" style="" data-wysiwyg="1" data-load-state="" data-tooltip=""></textarea></div></div>
I am trying to make a simple article submission form. I can get it to work with a simple title and text-area.
But i want the text-area to be a rich field with a wysiwyg editor. Therefore i selected WYSIWYG editor: Yes in the textarea options. But when i check the form it still shows me a normal textarea with no editor ..
This is the form code:
<div class="form-group gcore-form-row" id="form-row-submit_button"><div class="gcore-input gcore-display-table" id="fin-submit_button"><input name="submit_button" id="submit_button" type="submit" value="Submit" class="btn btn-default form-control A" style="" data-load-state="" /></div></div><div class="form-group gcore-form-row" id="form-row-title"><label for="title" class="control-label gcore-label-left">Title</label>
<div class="gcore-input gcore-display-table" id="fin-title"><input name="Title" id="title" value="" placeholder="" maxlength="" size="50" class="form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" type="text" /></div></div><div class="form-group gcore-form-row" id="form-row-content"><label for="content" class="control-label gcore-label-left">Content</label>
<div class="gcore-input gcore-display-table" id="fin-content"><textarea name="Content" id="content" placeholder="" rows="3" cols="40" class="form-control A" title="" style="" data-wysiwyg="1" data-load-state="" data-tooltip=""></textarea></div></div>
Hi tfmvdbroek,
This sounds as though there may be a JavaScript error on the page. Do you see anything reported in the console?
Bob
This sounds as though there may be a JavaScript error on the page. Do you see anything reported in the console?
Bob
I get this error:
Using getAttributeNode () is no longer supported. Instead, use getAttribute (). mootools - core.js : 108: 0
TypeError: container is null md_stylechanger.js : 61: 1
ReferenceError : tinymce is not defined form: 115: 46
Using getPreventDefault () is no longer supported. Instead defaultPrevented .
Hi tfmvdbroek,
This is the problem "tinymce is not defined"
Please check the page source to see if it being loaded at all. If it is then there may be a timing problem.
Bob
This is the problem "tinymce is not defined"
Please check the page source to see if it being loaded at all. If it is then there may be a timing problem.
Bob
Please try to fix this first JS error about mootools and that may solve the 2nd one, I have just tested the wysiwyg editor and it works fine!
Regards,
Max
Regards,
Max
I tried updating mootools but this does not seem to fix the warning nor the editor.
TinyMCE seems to be loaded in the source code:
Can we set another editor to test it with? Or do you guys have any clue how to fix this?
TinyMCE seems to be loaded in the source code:
<script type="text/javascript">jQuery(document).ready(function($){
$('*[data-wysiwyg="1"]').each(function(){ tinymce.init({"selector":"#"+$(this).attr("id")}); });
Can we set another editor to test it with? Or do you guys have any clue how to fix this?
I need a link to the form to test this, please post it here or using the PM
It is now running on a local only site. I will make an online copy and then come back to you.
Ok, you can also try testing using the "View form" link in the Chronoforms admin, add this to the link:
Check if this makes it work ?
&tmpl=component
Check if this makes it work ?
Only error it gives me then is: ReferenceError: tinymce is not defined. Mootools warnings are no longer there.
Still no editor tho ...
Still no editor tho ...
Then for some reason the tinymce file is not loaded, do you have any system plugins installed which do any control on the loaded files ?
Not that i can find. Would it be possible to use JCE instead of tinymce?
I found this snippet on your forums:
Pasting this in a custom code loads the editor with a different text field. But how do i use this in the article content field?
I found this snippet on your forums:
<div class="form_element cf_textarea">
<label class="cf_label">Details</label>
<br/>
<?php echo $editor->display( 'Details', '' , '100%', '350', '75', '20', false ) ; ?>
</div>
Pasting this in a custom code loads the editor with a different text field. But how do i use this in the article content field?
Sorry, This is the code i ment:
<?php
$editor =& JFactory::getEditor();
echo $editor->display( 'text_1', '{text_1}', '80%', '200', '75', '10', false);
?>
The built in editor should work, but its only tinyMCE.
Your code should also work, the 2nd parameter sets the editor value, you can try to load it from the data array directly:
Your code should also work, the 2nd parameter sets the editor value, you can try to load it from the data array directly:
<?php
$editor = JFactory::getEditor();
echo $editor->display( 'text_1', $form->data("text_1"), '80%', '200', '75', '10', false);
?>
The default editor (JCE) shows up now🙂 Thanks for that already.
Only problem now is that it does not put the text in the 'Joomla Artile' Action. I have set the Full text field name to: text_1 but it does not seem to use the input and fills in empty content.
Only problem now is that it does not put the text in the 'Joomla Artile' Action. I have set the Full text field name to: text_1 but it does not seem to use the input and fills in empty content.
Please try a "debugger" action before the Joomla article action and check if the data is passed correctly ?
Second data array seems to be empty?:
Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => News
[event] => submit
[submit_button] => Submit
[Title] => 11111111111111111
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
)
There is no "text_1" in the data array which means that the field doesn't exist, please post a link to your form ? here or by PM
This topic is locked and no more replies can be posted.