Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi guys,

I'm trying make my own Admin Dashboard using couch and I have some issues getting data-bound forms to work.. I followed the guide (and even tried the source) but I keep getting error:
Code: Select all
ERROR: Tag "input" of type 'bound' needs to be within a Data-bound form



Code: Select all
<cms:template title='Test Form' clonable='1'>
    <cms:editable name='x-datepicker' required='1' type='text' />
    <cms:editable name='x-owner' required='1' type='dropdown'
      opt_values=' Please choose=- | x | y | z'
    />
    <cms:editable name='x-amount' required='1' type='text' />
    <cms:editable name='x-units' required='1' type='dropdown'
        opt_values=' Please choose=- | y | z '   
    />
    <cms:editable name='x-unitprice' required='1' type='text' />
</cms:template>


and then

Code: Select all
                  <cms:form masterpage=form_test mode='create' enctype='multipart/form-data' method='post' anchor='0' >
           
            <cms:if k_success >
 
                <cms:db_persist_form
                    _invalidate_cache='0'
                    _auto_title='1'
                />
               
                <cms:if k_success >
                    <cms:set_flash name='submit_success' value='1' />
                    <cms:redirect k_page_link />
                </cms:if>
            </cms:if>
           
            <cms:if k_error >
                <div class="alert alert-danger"><strong>Error:</strong>
                    <cms:each k_error >
                        <br><cms:show item />
                    </cms:each>
                </div>
            </cms:if>
                   
                    <div class="form-group">
                       <cms:input name="x-datepicker" id="x-datepicker" class="form-control input-datepicker-close" data-date-format="mm/dd/yy" placeholder="mm/dd/yy" type="bound" />
               </div>
                    <div class="form-group">
                       <cms:input name="x-owner" id="x-owner" type="bound" class="form-control" size="1" />
                       
                    </div>
                    <div class="form-group">
                        <cms:input name="x-amount" id="x-amount" type="bound" class="form-control" placeholder="qty" size="1" />
                    </div>
                    <div class="form-group">
                        <cms:input name="x-units" id="x-units" type="bound" class="form-control" size="1" placeholder="price/unit" />
                    </div>
                     <div class="form-group">
                        <cms:input name="pm-type" id="pm-type" type="bound" class="form-control" size="1" />
                    </div>
                    <div class="form-group">
                        <cms:input name="x-unitprice" id="x-unitprice" class="form-control" placeholder="$$/unit" type="bound" />
                    </div>
                    <div class="form-group">
                    </div>       
                    <div class="form-group">
                        <cms:input name="submit" type="bound" class="btn btn-primary" /><i class="fa fa-user"></i> Add</button>
                    </div>

                </cms:form>


Ady ideas what I'm missing ? :(
You don't need a 'bound' type on submit input.
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
Adding to what @trendoman correctly pointed out -
when you declare an input as type='bound', it means that there is an editable region with the same name defined in whatever masterpage the form is bound to.

As can be seen, there is no editable region named 'submit' in your template, ergo the error.
That said, I think you'll get the same error for the input named 'pm-type' too as I don't see any corresponding editable region.
3 posts Page 1 of 1