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!
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…
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 (=
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>
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?
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…
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
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.