If anyone is looking to use Checkboxes Extension in a stand alone EDIT form using Form Helper plugin, you can get it to work with some fairly easy php. I’ve posted a link at Solspace’s Form Helper Support forum on how to do it.
http://www.solspace.com/forums/viewthread/2285/
Hope this helps.
Thanks to Brian M. for his help in getting this solution to work.
Checkboxes will also work in a SAEF (stand alone entry form) using the code that Brian M. posted on here in an earlier message.
If anyone is interested, or at least so I can find it in the future…
If you have really long labels, and need to change the number of columns in the control panel in order to make it legible, open ext.checkbox.php and look for:
//
// Publish Tab
//
function publish( $row, $field_data )
Within that function you’ll see the number 7 repeated several times, replace it with the number of columns you desire.
There is also some bit that look like:
$r .= $DSP->table_qcell("", "", "14%");
If anyone can figure out what that does I would love the heads up.
For those unclear on the concept (as I was), here is how this works:
This extension adds a “checkbox” choice when you are creating a Custom Field. To create a custom field follow these breadcrumbs in your Control Panel: CP Home › Admin › Weblog Administration › Field Groups › Custom Fields
You can create a required checkbox by installing this extension, creating a custom field, choosing “textbox” and selecting “yes” to the question, “Is this a required field?”
just for the sake of people finding this page by search (as I was)… “make a checkbox required” “required checkbox”
Peace, N+
P.S. Here’s a very simple example of the checkbox in normal EE code (what’s with all the php in this thread… Ya’ll’er geniuses!)
<input class="saef_inputs" type="checkbox" name="field_id_14" id="field_id_14" /><label for="field_id_14">I am not violating copyrights by uploading this file.</label>
Hi,
I’ve installed the checkboxes extension, which is working well.
But, I need to display the values from my custom field separately – is there any way to parse them so that I can show, from field1:
value1 [formatting code here] value2 [formatting code] value3 etc.
right now, it just comes as one glob: value1, value2, value3
Thanks for any help!
Phoebe
Hello,
Anyone else getting this, or similar, error:
Warning: Typography::require_once(/home/user/public_html/system/plugins/pi..php) [function.Typography-require-once]: failed to open stream: No such file or directory in /home/user/public_html/system/core/core.typography.php on line 474
Fatal error: Typography::require_once() [function.require]: Failed opening required '/home/user/public_html/system/plugins/pi..php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/user/public_html/system/core/core.typography.php on line 474
I get the above error when publishing an entry with a custom field checkbox “checked”… If the entry has the checkbox un-checked, then I do not get the error.
I really think this is the solution:
“Fix-It-Yourself Extensions, or The Field Formatting Fiasco” http://devot-ee.com/articles/item/fix-it-yourself-extensions-or-field-formatting-fiasco/
But I am not sure exactly where to insert the fix into the checkbox extension…
Anyone here ever experience the same problem? If so, have you applied a fix? If so, feel like saving me some time? :D
Thanks! Micky
Anyone here ever experience the same problem? If so, have you applied a fix? If so, feel like saving me some time? :D
Ahh, fixed it… At least from the few tests I have done, I am no longer getting that error.
Changed this code (starting on line 275):
if($key +1 % 7 != 0)
{
while(($key +1) % 7 != 0)
{
$r .= $DSP->table_qcell("", "", "14%");
$key++;
}
$r .= $DSP->tr_c();
}
$r .= $DSP->table_close();
To this:
if($key +1 % 7 != 0)
{
while(($key +1) % 7 != 0)
{
$r .= $DSP->table_qcell("", "", "14%");
$key++;
}
$r .= $DSP->tr_c();
}
// add formatting
$r .= $DSP->input_hidden('field_ft_' . $row['field_id'], $row['field_fmt']);
$r .= $DSP->table_close();
Seems to work for me.
Thanks to devot-ee for the informative post, and to Mark for the kick-butt addons!!!
Cheers, Micky
Any idea what’s going on?
Hi,
So, are you saying that your custom fields are outputting the value of one checkbox field?
You might try naming your custom fields differently… For example, instead of:
{checkbox_field}
{custom_field2}
{custom_field3}
Try:
{checkbox}
{custom_field2}
{custom_field3}
In other words, make the name completely different from any other custom field. I only mention this because I have run into field naming problems when using MH File:
http://ellislab.com/forums/viewthread/38997/P900/#636355
Also, what does this output:
{exp:weblog:entries ...blah blah...}
{checkbox_field}
{/exp:weblog:entries}
And vice versa:
{exp:weblog:entries ...blah blah...}
{custom_field2}
{custom_field3}
{/exp:weblog:entries}
If none of the above helps, you will probably have to post more detailed info and/or your exact template code.
What version of EE? What version of PHP? What other addons/extensions installed?
Many thanks. Changing the field name worked. The actual fieldnames were {projects_video} <–checkbox {projects_video_thumbnail}
{projects_video_url}
Changing {projects_video} to {mycheckbox} made the problem go away.
[for the record, I first tried the other ideas, thinking there was no way the above could be true 😊
Removing the custom fields leaving only the checkbox field resulted in the checkbox field’s value being outputted.
Removing the checkbox field (as in visa-versa above) did not change the output of the others - they still show the value of the checkbox field.
EE 1.6.8 PHP 5.2.6 Other Extensions: LG Twitter, Tag Submit Plugins: default Modules: default + Discussion Forum, Wiki, Tag ]
Many thanks. Changing the field name worked. The actual fieldnames were {projects_video} <–checkbox {projects_video_thumbnail} {projects_video_url} Changing {projects_video} to {mycheckbox} made the problem go away. [for the record, I first tried the other ideas, thinking there was no way the above could be true 😊
Woot!!!!
Yah, it is an easy bug to overcome, just annoying if you do not realize it is a bug.
Glad I was able to help! 😊
Cheers, Micky
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.