Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
18 posts Page 2 of 2
had to add static to handle_params() methods within a few classes to get this to work with Couch 2.0

I think that issue has to do with PHP7, not v2.0 of Couch.

Thanks for giving me a nudge. I'll get an update posted soon to correct it.
Hi, i did install the HTML5 tags addon on my Couch, im not using Couch 2.0. And the input tags are working.

But when im saving the data dont get saved. Must i add something to db_persist or something or is there anything else im doing wrong.

Code: Select all

            <cms:if k_success >
                <cms:db_persist_form />

                <cms:if k_success >
                    <cms:set_flash name='success_msg' value='1' />
                    <cms:redirect 'profile-user.php' />

            <div class="col-md-2">
                   <div class="form-group">
                           <cms:input name='mobil' type="tel" class="form-control" />
<div class="panel panel-flat">
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <button type="submit" class="btn btn-primary" style='width:100%;'>OPPDATER OPPLYSNIGNER <i class="icon-arrow-right14 position-right"></i></button>

@heggeneskim, Hi :)

Only cms:inputs of type 'bound' get persisted automatically (that is what the term 'bound' suggests).

Any other type you choose to use in the form, needs to be explicitly persisted. As an example, assuming your template has an editable region named 'phone' and the form has an input named 'mobile', the following will push the value submitted in 'mobile' into the 'phone' editable region -
Code: Select all
    phone = frm_mobile

Please do notice that the variable we have used above is named 'frm_mobile' and not simply 'mobile' because, as explained in the docs on forms (, Couch prefixes 'frm_' to all input names in the success condition.

If you wish, you may search the forum and you can find many examples of <cms:db_persist_form> usage.

Hope it helps.
not works with couch2 and couch2.1beta
@andrejprus, seems to be working just fine for me on both versions.
What exactly is not working for you? Please post the code you are using.

i download zip file from 1 post attachment



then trying to use type="color"

and at output in browser at front-end I have:
The addon actually only adds new <cms:input> types and not <cms:editable> types.
That is to say, those HTML5 inputs are meant to be used on front-end forms e.g.
Code: Select all
    <cms:input type='email' name='email' validate='0' required='1' />

Hope that explains the perceived problem.
ooh, understood.. in <cms:form> thank u!!!
18 posts Page 2 of 2

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 2 guests