Questions tagged [checkboxes]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
18 views

Error 'form[fieldName] : <fieldName> is invalid' while submitting multiple checkboxes

I have a form with multiple checkboxes in it. However, when submitting the form it returns an error like this: {"success":false,"errors":{"formDate":["Date is invalid."]}} template: <input type="...
1
vote
1answer
15 views

Freeform Checkbox Group Field only returns one value

I need a scenario where users can select multiple options within a checkbox group. Unfortunately Freeform only returns the last value selected and ignores the rest? I might be missing the point but ...
1
vote
2answers
86 views

How do I access the checkbox field column value as a PHP array?

I have a checkbox field for dining cuisine types and I see that the checked options are stored as a JSON-encoded array in the content table. If I have an element that uses this field, is there a way I ...
1
vote
2answers
307 views

Convert checkbox values from an array to a string

I have a front end form with multiple checkboxes. Is it possible to convert the checkbox values from an array to a string before it's submitted to the database? I want to save the checkbox values ...
1
vote
0answers
81 views

Craft 3: Possible to merge checkbox and text values from a frontend form and put into a plaintext Craft field?

Is it possible to submit checkbox array and text values on a front end form into a plaintext Craft field in Craft 3? My solution worked in Craft 2 but it broke in Craft 3 due to some under the hood ...
1
vote
1answer
68 views

How to output 'selected' checkbox labels within a matrix

Newbie here. First Craft 3 CMS build and fumbling with logic of Matrix blocks. I've created a relatively simple matrix field, and I can output plain text and dropdown options, but not sure how to do ...
1
vote
1answer
36 views

Translating checkbox labels

I'm trying to translate the labels for a global checkbox field in my front-end templates like in this post: Is there a way to have checkbox field labels translatable?. This looked promising but I can'...
1
vote
1answer
37 views

Entry Form: Populate checkbox list from another entry and save options in entry

I am trying to load some options in to a checkbox list from another entry so that a user and save select them form a checkbox list but I am unable to save the Entry Form with their selection. I have ...
1
vote
1answer
30 views

Sprout Forms: Populate checkbox field options with entry data

I have a form with a checkbox field. I want the options of the checkbox to be pulled from an entry field. My custom field template is below but it wont pass validation. I guess this is because Sprout ...
0
votes
2answers
493 views

Filtering search with checkboxes multiple param querystring

I have a series of checkbox like so: <fieldset data-role="controlgroup"> {% for option in craft.fields.getFieldByHandle('area').getFieldType.options %} <input type=...
2
votes
1answer
456 views

User registration form with checkbox field

Hi I have user registration form with multiple custom fields. They all work fine except for the field I have as a checkbox. It returns an error of 'my-field' is invalid. Any ideas anyone? code below (...
2
votes
2answers
210 views

getQuery() returns only one value

I have a URL passing values from form checkboxes to a template. All the checkboxes are grouped with the same name= attribute. When multiple checkboxes are selected, the query string looks something ...
1
vote
1answer
90 views

Freeform conditionals

This code works as expected... {% if submission.symptomCheckerSymptoms == "Itching" %} it works {% endif %} ... but when when multiple options are selected, it doesn't. The field is a checkbox ...
0
votes
1answer
280 views

Searching on multiple checkboxes

I've got a question that I can't seem to get fixed all by myself... I've got a search form and each entry has got field with some checkboxes (in this case these are options). Now I'd like to search ...
2
votes
2answers
223 views

Frontend Form - Checkboxes cannot “all” be unchecked

I have a frontend entry form with some checkboxes that is not behaving correctly. If you uncheck all options and save, nothing changes (this is bad). However if you uncheck one item and check another ...
2
votes
0answers
45 views

Retain value from select and checkbox on frontend form after failure

I have a registration form on my frontend and when people click register but the form fails (due to the username already existing for example) I would like to keep all info they entered in the form so ...
1
vote
1answer
42 views

Sum of one checkbox field

I have a checkbox field which I want the sum of a certain checkbox: {% set countPremiere = 1 %} {% set iterationPremiere = 0 %} {% set premiereTotal = 0 %} {% for entry in allEntries %} // the ...
1
vote
1answer
62 views

Is it possible to allow a user choose tags in admin panel using checkboxes?

The system I'm building requires a flexible taxonomy, where users should be able to add new taxonomy stuff to entries really easy and freely as soon as the need arises. So tags seem to work best for ...
1
vote
1answer
261 views

Drop-down and checkbox in a condition

I'm new to Twig, and I'm struggling to compare a value from a checkbox with a value from a drop-down {# sourceCountry - checkbox with a list of countries #} {# currentUser.country - dropdown ...
2
votes
3answers
354 views

Only executing if a matrix checkbox has a specific value

I currently have checkboxes in a matrix block that allow a user to select where an image will be placed in the layout (as a featured slider image and/or in an image gallery). I've gotten the slider ...
1
vote
1answer
59 views

Checking value of customer order field within Plugin

I am trying to check the value of a checkbox as part of my checkout process. I have the following function at the moment. public function init() { craft()->on('commerce_orders....
2
votes
2answers
275 views

Is it possible to convert plain text array to an unordered list?

I have a front end form with checkboxes which submits the data as an array into a plain text field in craft (named logGeneral_logInputIndications). Here's an example of what the content looks in the ...
1
vote
1answer
191 views

form submission with checkbox list

I have multiple checkboxs in a form <input type="checkbox" name="Classification[]" value="Hub Zone">Hub Zone <input type="checkbox" name="Classification[]" value="Not Applicable">Not ...
1
vote
1answer
359 views

Get entries from client checked options

I have a checkbox field to enable my client to choose what entry categories to have as an article feed on a page. How can I output the checked option categories when setting the entries in the for ...
2
votes
1answer
288 views

Selecting entries using a checkbox field

I had what I thought was a very simple issue: Select some categories on the front-end, filtering by a Checkbox field. The Checkbox has values, which correlate to Locales. The end goal was to create ...
1
vote
1answer
46 views

Can anything be done to suppress or limit the clickable area of the checkbox in a Matrix block header?

You know, the one that gangs blocks together but never really gets explained in the docs. I hate that thing. I hate it because double-clicking (or single clicking) anywhere in a Matrix block header ...
0
votes
0answers
82 views

Advanced search form with checkboxes [duplicate]

So it seems that Matrix fields don't work with the object syntax so I've changed my field structure to use standard dropdowns, checkboxes and a number field. I have the dropdown (gender) and number ...
2
votes
2answers
1k views

Search against a checkboxes field's options

I have a relatively simple structure for products that I am building an advanced search for. I access the products using craft.entries.section('products'), but these products have fields with options ...
0
votes
1answer
798 views

Checkbox array for days of the week

I'm attempting to create something within my template using global values and checkboxes. What I need this to do is "if it's one of the days of the week marked as open, as selected by a checkbox, and ...
2
votes
1answer
777 views

Craft Request Filter Query Matching Drop Down Fields and Checkbox Fields

I have a front end form that allows users check checkboxes to find entries that have matching field values. I've pieced together a query reading other posts here and my limited knowledge of Craft and ...
2
votes
2answers
328 views

Display only one entry with checkbox checked in my pagination loop?

I have multiple entries in 'blog' that have the 'featurePost' checkbox field checked. I want to display ONLY the latest, but this code is displaying multiple fields. {% paginate craft.entries({ ...
1
vote
1answer
239 views

How do I handle and/or repopulate checkbox group(s)?

I have a contact form (public facing only) on my site that has a checkbox group. The user can pick their favorite color(s). Upon successful submission I am capturing that data within the CP via a ...
1
vote
3answers
494 views

Can't get checkboxfield values to show

I'm trying to build a filter and for that I want my client to be able to select a few options, which I use as classes for in my filter. I chose for a checkbox field and set it up in the backend. Now ...
1
vote
1answer
591 views

Getting checkbox options for a new entry, without having an entry

How would I get a list of all the checkbox options associated with a specific field, without having an entry to loop over? I'm using the same form for creating new entries and editing existing ones. ...
1
vote
1answer
247 views

Multiple checkbox conditional

I have a set of checkboxes to show content on a page. I have one instance where I'd like to show something if either checkboxes are selected. I have searched around but couldn't find how to combine ...
1
vote
1answer
123 views

List entries of documents in a section grouped by checkbox

I'm trying to list entries in a section which are documents. Those documents are grouped by checkbox. I'd like to list the document title and the asset in the entry's url. I only want to list assets ...
0
votes
3answers
728 views

How to populate a custom checkbox field with tag data dynamically?

Hi wondering if this is possible. I have a custom checkbox field for user interests added to the user profile. Is there a way to populate the checkbox options dynamically using tag data?
0
votes
1answer
558 views

Retrieving Checkbox Values from Plugin

I have a checkbox field that is populate with user choices. I need to get the values they have selected from within a plugin. Here is my attempt. Not working. $entry = craft()->entries->...
1
vote
2answers
1k views

Getting Checkboxes to work on Frontend Forms

I have tried to follow the instructions listed here for checkboxes on frontend forms but have not been successful in implementation. First, here is my code: <form method="post" action="" accept-...