Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
There are only four text-field in register section, how to add another text-field, checkbox, radio button and etc? example: fax, telephone number and etc.

I trying to add "my company" input text-field in index.php, profile.php, register.php...

It shows error say that "my company" is not in database....
The 'members/index.php' is just a regular Couch template.
Please add all needed editable regions to it like you do in normal templates.
As per usual, make sure to visit the template as super-admin for the changes to persist.

Once the new regions become visible in the admin-panel, you can reference them in the other templates e.g. registration or profile.
Hi,

Thanks for the tips. it worked.

I am now able to add and display the data of text-field. But If I add radio and checkbox, the selected data will display in admin panel, but it's not display in profile page. What part am I missed?

Members/index.php

Code: Select all
<cms:editable name='company_name'  type='text' />
    <cms:editable name='shade'  type="radio" name="shade" opt_values="Dark=dark | Light=light" />
    <cms:editable name='shade'  type="checkbox" name="toon" opt_values="Goofy | Donald | Bugs Bunny=Bugs | Scooby Doo=Scoob" />




Members/register.php

Code: Select all
<cms:member_process_registration_form
                        company_name=frm_company_name
                        shade=frm_shade
                        toon=frm_toon
                    />
                   
                    <cms:if k_success >
                        <cms:set_flash name='success_msg' value='1' />
                        <cms:redirect k_page_link />
                    </cms:if>
                </cms:if>

                <cms:if k_error >
                    <font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
                </cms:if>
               
               
                Screen Name:<br />
                <cms:input name='member_displayname' type='text' /><br />
               
                Email Address:<br />
                <cms:input name='member_email' type='text' /><br />
                                   
                Password:<br />
                <cms:input name='member_password' type='password' /><br />
               
                Repeat Password:<br />
                <cms:input name='member_password_repeat' type='password' /><br />
               
                Company Name:<br />
                <cms:input name='company_name' type='text' /><br />
               
                Shade:<br />
            <cms:input type="radio" name="shade" opt_values="Dark=dark | Light=light" /><br />
               
                Select your favorite cartoon characters.<br>
<cms:input type="checkbox" name="toon" opt_values="Goofy | Donald | Bugs Bunny=Bugs | Scooby Doo=Scoob" />
                   
               
                <input type="submit" name="submit" value="Create account"/>
               
            </cms:form>



Members/profile.php

Code: Select all
 <cms:form 
        masterpage=k_member_template
        mode='edit'
        page_id=k_member_id
        enctype="multipart/form-data"
        method='post'
        anchor='0'
        >
       
        <cms:if k_success >
            <cms:db_persist_form />

            <cms:set_flash name='success_msg' value='1' />
            <cms:redirect k_page_link />
        </cms:if> 
       
        <cms:if k_error >
            <font color='red'><cms:each k_error ><cms:show item /><br /></cms:each></font>
        </cms:if>
       
       
        DisplayName:<br />
        <cms:input type="bound" name="k_page_title" style="width:200px;" /><br />


        E-mail:<br />
        <cms:input type="bound" name="member_email" style="width:200px;" /><br />
       

        New Password: (If you would like to change the password type a new one. Otherwise leave this blank.)<br />
        <cms:input type="bound" name="member_password" style="width:200px;" /><br />


        Repeat Password:<br />
        <cms:input type="bound" name="member_password_repeat" style="width:200px;" /><br />
       
        Company Name:<br />
        <cms:input type="bound" name="company_name" style="width:200px;" /><br />
       
        Shade:<br />
      <cms:input type="radio" name="shade" opt_values="Dark=dark | Light=light" /><br />
       
        Select your favorite cartoon characters.<br>
<cms:input type="checkbox" name="toon" opt_values="Goofy | Donald | Bugs Bunny=Bugs | Scooby Doo=Scoob" />


        <input type="submit" name="submit" value="Save"/>   
       
    </cms:form> 
3 posts Page 1 of 1
cron