by
KK » Fri Oct 18, 2013 3:38 pm
Hi,
Do I understand correctly that the use of a richtext field on the new DataBound Forms isn't possible ?
It is certainly possible. In fact, it is now possible to use on the front-end every single type of editable region we use in the admin-panel.
The only catch is that those regions that have no
cms:input counterpart (e.g. richtext, nicedit, relation, repeatable etc.) depend on their specific CSS/JS and other assets to work correctly.
If we can manually add the required assets to the front-end template, we can use those without a problem.
Addressing specifically the richtext type, it'd require adding the following line in your template (just below the
<?php require_once( 'couch/cms.php' ); ?> statement)
- Code: Select all
<?php require_once( K_COUCH_DIR.'includes/ckeditor/ckeditor.php' ); ?>
Also: I 'm not sure how to use the mode='edit' in a workflow e.g.
The documentation for DataBound Forms
http://www.couchcms.com/docs/concepts/d ... forms.html) discusses creating a custom edit screen in the admin-panel. The code for it (can be found in the attached zip) implements the 'edit' mode. You can study it to see how exactly it works. In short, it requires the 'id' of the page to edit.
When I have a form that creates a new page and after the user submits the form, he/she gets redirected to the new created page. On this point the user notice an error and want to correct this... can this only done by creating a update form or is there a way to edit the fields of the new page inline (directly)..
Once a page gets created, we'll have to use the 'edit' mode (discussed above) to make changes to it.
While this is perfectly possible to implement, there is a small practical issue that'd make it not feasible (for now at least).
See, what you are trying to code up is a mini admin-panel where the visitor edits his own page(s). To allow this to happen we'll need to associate pages with the users who created them (else you'll open up the possiblity for knowledgeable users to edit *all* pages).
Currently, as you know, we don't have a proper user/access-control system in place.
So, it'd be better not to implement 'edit' on the front-end for now.
Of course, releasing a proper user module is one of the top priorities now and we should have one shortly.
That coupled with the already existing 'relations' feature will finally open up the doors to create full-fledged applications like newsletters, forums etc. using Couch tags alone.
Hope this answers your queries.
Thanks.