5099 Posts in 1519 Topics by 1116 members
|Go to End|
21 October 2009 at 4:45am
I'm writing a module to extend SilverStripe. In the module I create serveral form fields (TextField, TextareaField and so on). Furthemore I can save everything into my MySQL database. But there is a problem: I can't save the modified content of an HTMLEditorField. If I edit manually the HTML content in the database, it will displayed without any problems. But in the CMS Backend no chance, the content will ignored. The database array field is set to 'HTMLText'. So this isn't the problem.
My function getEditForm($id) return form. The AJAX request works! So I looked into the requested object and there is no value of the form field with the HTML text. If I changed the HTMLEditorField into a TextareaField everything works and the content will updated in the database. So my question is why does the requested object doesn't have the value of a form field of type HTMLEditorField.
21 October 2009 at 12:27pm
Is your database field a 'HTMLText' field?
21 October 2009 at 6:49pm
Yes, my database field is a HTMLText. If I don't set this type, I will get a error in the function saveInto() on the class HTMLEditorField
So this isn't the reason for my problem. I hope you have another solution.
2 November 2009 at 8:32am
> But there is a problem: I can't save the modified content of an HTMLEditorField
|Go to Top|