We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Checkboxes

Development and Programming

lithiumdave's avatar
lithiumdave
215 posts
18 years ago
lithiumdave's avatar lithiumdave

And now it’s doing it without a hitch. Grrr…

Sorry : )

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.

Someone else asked and I didn’t see a reply - is there a way to get this to work with a SAEF? I have to use checkboxes in a variety of SAEFs and I need some field in the CP that will accept multiple values. This doesn’t seem to work as is - did anyone find way to make it work? Or barring that - is there ANY CP field that will accept multiple values from a list of some sort?

Any replies greatly appreciated (deadline fast approaching).

Thanks!

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.

To follow up on my own question 😛

I had a bit of sloppy coding that wasn’t allowing it to work. This DOES work using a SAEF as long as you name the field correctly. You have to name the field in the form to accept multiple selections but adding [] to the end. So if you’re looking at field 19, the field name should be field_id_19[].

I’m not using the auto-generation of fforms, I’m building my form manually, so I’m not sure if it works when you auto-generate the form…

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.

Question - in the CP when you’re setting up the custom fields and choose checkbox, the ‘textarea rows’ field shows. It doesn’t appear to do anything. Does that do anything or is it just there hanging out?

       
neweras's avatar
neweras
5 posts
18 years ago
neweras's avatar neweras

ok. i have the ext.checkbox.php and the lang.checkbox.php.. now how or where do i drop these? i have the lang.cehckbox.php in the lang/english/ dir and the ext. in the externtions dir. but when i try to add a custom field. the checkbox option doesnt show.. can i get some help (=

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.

Did you enable the extension in the utilities->extensions area?

       
neweras's avatar
neweras
5 posts
18 years ago
neweras's avatar neweras

ya. its enabled. but when i go to the custom field to add a new field. the field type only show the original 3 fields. not the checkbox.

       
neweras's avatar
neweras
5 posts
18 years ago
neweras's avatar neweras

is this extention used in the Custom Profile Fields? or this extention is for something else? i only see “Text Input”, “Text Area”, “Drop-Down Menu”. where is checkbox? please help out.

       
neweras's avatar
neweras
5 posts
18 years ago
neweras's avatar neweras

can someone give me a hand on how to get the checkbox to work with the members custom form fields? thanks.

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.

I don’t think this can be used in conjunction with member custom form fields unfortunately - it’s for weblogs…

       
neweras's avatar
neweras
5 posts
18 years ago
neweras's avatar neweras

ohhhhhhhh.. doh!!!!.

thanks brian.

so how would i make a checkbox for the member registration form?

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.
ohhhhhhhh.. doh!!!!. thanks brian. so how would i make a checkbox for the member registration form?

You can manually build a form that registers people - all you need to do is include:

<input type="hidden" name="ACT" value="7" />

in the form. You’ll probably want to include a few other hidden fields. Here’s a manual registration form I’m currently using:

<h1>Member Registration</h1>
            Please fill out the form below. All fields are required. After registering you will receive a confirmation email - follow the link in that email to complete the registration process.        
            <form id='register_member_form' method="post" action="">
            <fieldset>
                <input type="hidden" name="XID" value="" />
                 <input type="hidden" name="ACT" value="7" />
                <input type="hidden" name="mbase" value="{path=pages/thank_you/register}" />
                <input type="hidden" name="RET" value="{path=pages/thank_you/register}" />
                <input type="hidden" name="FROM" value="" />
                
                <label for="username"><span class="required">*</span> Username</label>
                <input class="inputMedium" type="text" name="username" value="" maxlength="32" />

                <label for="password"><span class="required">*</span> Password</label>
                <input class="inputMedium" type="password" name="password" value="" maxlength="32" />
                
                <label for="password"><span class="required">*</span> Password Confirm</label>
                <input class="inputMedium" type="password" name="password_confirm" value="" maxlength="32" />
                <label for="password"><span class="required">*</span> Screen Name</label>
                <input class="inputMedium" type="text" name="screen_name" value="" maxlength="32" />
                <label for="password"><span class="required">*</span> Email Address</label>
                <input class="inputMedium" type="text" name="email" value="" maxlength="120" />
                <label for="password"><span class="required">*</span> Company Password</label>
                <input class="inputMedium" type="text" name="m_field_id_1" value="" maxlength="32" />
                
                <label for="rules"><span class="required">*</span> Terms of Service</label>
                <textarea name='rules' class='textShort' readonly>All messages posted at this site express the views of the author, and do not necessarily reflect the views of the owners and administrators of this site.

By registering at this site you agree not to post anything that is obscene, vulgar, slanderous, hateful, threatening, or that violate any laws. We will permanently ban all users who do so. 

The VBSR forums are an information and networking resource for members. We ask that you not post any advertisements, sales, discounts, solicitations, promotions, or any other content to advance your business. We reserve the right to remove any messages that we feel falls under the above categories, and the right to remove, edit, or move any messages for any reason.</textarea>    
                <ul>
                    <li><input type='checkbox' name='accept_terms' value='y' />I agree to the terms of service.</li>
                </ul>                
            </fieldset>
            <input class="button" type="image" name="submit" src="/css/images/button_register.gif" />
            </form>
       
UltraBob's avatar
UltraBob
186 posts
18 years ago
UltraBob's avatar UltraBob

Could someone (especially Brian M since he said he had it working) show a code sample for how to display checkboxes with a stand-alone entry form? Mark I love your work, though it is a shame that your doc page doesn’t seem to actually contain any docs. Maybe We could set up wiki pages for your extensions?

       
Brian M.'s avatar
Brian M.
529 posts
18 years ago
Brian M.'s avatar Brian M.
Could someone (especially Brian M since he said he had it working) show a code sample for how to display checkboxes with a stand-alone entry form? Mark I love your work, though it is a shame that your doc page doesn’t seem to actually contain any docs. Maybe We could set up wiki pages for your extensions?

Ultrabob - I’m manually creating my SAEFs and just putting in checkboxes… Here’s a snippet (I can post the whole form if it would help):

<li><input class="checkbox" type="checkbox" name="options[]" value="Learn more about joining a committee" />Learn more about joining a committee</li>
<li><input class="checkbox" type="checkbox" name="options[]" value="Sponsor an event" />Sponsor an event</li>
<li><input class="checkbox" type="checkbox" name="options[]" value="Learn about upcoming VBSR events" />Learn about upcoming VBSR events</li>

Just make sure to have [] after your field names, and you should be all set…

       
Adam George's avatar
Adam George
283 posts
18 years ago
Adam George's avatar Adam George

Does anyone know if it’s possible to change the delimiter on the output of the checkbox extension? Currently it outputs as: Blah, Blah, Blah, Blah. I’d like to change the commas into pipes (|), but only in a specific instance (I don’t want to hard code it for everything). I guess I could use php if I need to…

Thanks

       
First 2 3 4 5 6 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.