@Michael: Custom profile fields are a little different, but certainly possible if you’re up for a little tinkering. You’ll have to poke around in the /system/cp/ files and find the places to make changes as I’ve never really looked into this. On the surface though I can’t imagine it would be too difficult.
@Seth: I’m still a little confused. The tag isn’t a loop so there shouldn’t be any need (or possible way) to use the count. You simply call {field_name} and it prints out ALL the selected checkboxes. There’s no way to say something like {field_name}....{count}....{/field_name}. Can you explain how you’re using the count? My initial guess is that you’re seeing the count of the weblog entry the field is in and not the count of the checkboxes.
I am trying to fix an IE6 bug and for some reason the from the third box down there is a 3px bump to the left and I have a special class that fixes that. So I was trying to use count to give that style to the items if they went above the second one.
can you show me the EE tags you’re using to create that list? In your previous example each li was printed explicitly, not in a loop so you could just apply the class directly to that <li>.
When I used that it would count the total number and if the total number was greater than 2 it would add the class to all items displayed and vice versa.
Thanks for taking the time to keep looking into this.
I’m sure that I’m using it incorrectly, but in the docs this is what it says:
“You could use this to apply different styles to the first entry or have the last 5 entries out of 10 be formatted differently.” but it refers to entries rather than physical items.
I was trying to get {count} to count the total number displayed between the {if} conditionals. But that is not how it is used.
I see. The {count} tag displays the number of the entry being displayed. It has no bearing in regards to the fields within the entry. If you’re trying to get the number of items in a checkbox field, you may be best off using PHP. Something like this may work:
I must be missing something crucial here but I just can’t get the extension to output the chosen checkbox values from the weblog entry. I’ve called my checkbox custom field ‘sizes’, and the checkboxes appear in the entry form. I’ve also placed {sizes} in my template, within the weblog:entries tag - which incidentally is displaying all other custom field content. But nothing appears in the rendered page, just blank.
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).
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…
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?
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 (=
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.