Forum for discussing general topics related to Couch.
2 posts Page 1 of 1
I have a 'parish_comment' field in one of my templates, which I allow suitably authorised users to edit on the front end.

It's a richtext field, and I've attached ckeditor to the page on which the front-end editing happens. So this:
Code: Select all
<cms:input name='parish_comment'  type='bound' trust_mode='1'  />

results in a textarea with a full editing interface.

If I use the 'toolbar' (and custom_toolbar) parameters on the editable, the front end form also gets the same toolbar and customisation.

Is there any way of removing some buttons in the front end, but leaving them in the backend?

For example, I'd rather not allow front-end users to edit the source (most of them wouldn't know what to do with it), but it's good to have it in the backend so that I can sort things out if they somehow make a mess of editing!
Type 'bound' will display *exactly* the same on the frontend as it does in the backend. So using a bound field for the richtext editor will not allow you to customize it separately on the frontend.

As an alternative, however, you can try using a separate type 'textarea' <cms:input> (and attach CKEditor to it using JS - you can get more info on CKEditor's site about this or see how Couch does this by doing a view:source) on the frontend form, instead of the bound field.

In the success condition of the form, you can then force the input's value into the main field through <cms:db_persist_form> tag e.g.
Code: Select all
<cms:db_persist_form 
     whatever_main_field_name = "<cms:show frm_whatever_input_name />"
/>

Hope this helps.
2 posts Page 1 of 1