Questions tagged [drop-down]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
26 views

How to build front-end dropdown to sort images with {% tag %} function?

how can I build a front-end HTML dropdown selector with the "tag" function in CraftCMS 4.x? I'd like the user to be able to sort a couple of masonry images that are associated with an entry ...
MvVijfeijken's user avatar
1 vote
1 answer
22 views

Filter entries on dropdown field value

I have a series of entries and I want to only display ones whose dropdown field matches a certain value. At the moment, my unfiltered query is like this: for item in entry.children.limit(6).orderBy('...
Tyssen's user avatar
  • 643
2 votes
0 answers
76 views

How do you access the Label of a Table field column with a Type of Dropdown?

How do you access the Label of a Table field column with a Type of Dropdown? I have a Table field in a Matrix block and one of the column types is a Dropdown. When I use the {{ row.handle }} syntax ...
doctorgloom's user avatar
2 votes
2 answers
177 views

Is there a way for a user to assign another user to a group on the frontend?

So, I'm trying to build a dashboard where the partner of the company I work for can edit users. And I want him to be able to have like a drop down to assign the user's group on the frontend. Is there ...
Keatyn Garton's user avatar
1 vote
1 answer
353 views

Field dropdown - default value is not working in CMS

maybe this is a weird question but I have a dropdown field with values from 1 to 10, and set 4 as a default value. The thing is: I edit my entry and when I see my dropdown the value is number 1, but I ...
suhkha's user avatar
  • 121
1 vote
1 answer
152 views

Show specific values when dropdown is select

I have a situation where I need to display booking links when the user selects a location from the dropdown list. I have 30+ locations. Each location may have 3-5 different booking page links. May I ...
Aima's user avatar
  • 13
1 vote
2 answers
337 views

Sort Entries by Value from Dropdown

I have a list of students and can sort them by name, sport, and school. The name and sport portions are easy, I'm grabbing the values without issue. Where I'm struggling is the school value is from a ...
Cynder Gray's user avatar
1 vote
1 answer
134 views

Craft 3: fetching a single Matrix row by its dropdown field value

I have 2 Matrix fields in an entry type, both of which use Dropdown fields: Matrix: urls address (block type) context (dropdown field values include 'own') address urn ...
Jonathan Schofield's user avatar
3 votes
1 answer
180 views

Math with numeric values derived from a dropdown field

I had a dropdown field with a handle of hLevel, with only numeric values in it, anticipating that I could do math with the values in my template. But it seems I can't. {% set dif = subhead.hLevel - ...
Jonathan Schofield's user avatar
1 vote
2 answers
334 views

Dropdown field value getting outputted multiple times

I have a dropdown field that has three options. In my template, I want to do one thing if option 1 is selected and do something else if option 2 is selected. Here is what my code looks like: {% for ...
adsfgfhg's user avatar
3 votes
1 answer
341 views

How to print all possible options of a dropdown field inside of a Matrix field?

I'm asking this outside an entry context. My starting point is {% set field = craft.app.fields.getFieldByHandle('matrixFieldHandle') %} When I print the data of the field, I find nothing ...
Romain P.'s user avatar
  • 1,808
2 votes
1 answer
91 views

LJ Dynamic Fields - Only Seeing Latest 100 entries

I am currently creating various component entries (under channels). Once created I can then add that specific component to structure (know on my site as a work page). On the work page I have a ...
eric MC's user avatar
  • 163
1 vote
1 answer
387 views

Translatable dropdown menu

Does anyone know how to make the dropdown field translatable? I'm working on a site which has both English and German languages, but whenever I set up a dropdown field it only ever appears in English ...
fbnntt's user avatar
  • 109
1 vote
0 answers
77 views

Show Images via Dropdown dynamically

I am currently working with craft. I want to create a filter with a dropdown list that will only display the images, that are related to the selected dropdown. Is that even possible? What I have: ...
Zoruak's user avatar
  • 11
1 vote
1 answer
362 views

Is it possible to use an existing field into a matrix?

I'm trying to reuse a dropdown field inside of a matrix. I've already created a field which has hundreds of dropdown values. I want to be able to select from this dropdown field for each item of a ...
user6999's user avatar
  • 157
1 vote
1 answer
154 views

Use value of a dropdown field for an `include`

I'm trying to have this include be updated by the option I choose in my dropdown. {% include 'subnav_programs.html' %} My dropdown is called entry.dropSubsection I put {% include '{{ entry....
kingkelly's user avatar
  • 337
1 vote
1 answer
25 views

error when trying to loop through grouped entries according to dropdown field

I was trying to follow this example from stack overflow to loop through a list of entries and output them by a custom dropdown field {% set allEntries = craft.entries.section('resource').find() %} {% ...
mheavers's user avatar
  • 125
2 votes
2 answers
404 views

Front End Form with Dropdown in Matrix - Adding New

I've got a Matrix field called Emergency Contacts (handle: emergencyContact) that I'm setting up so that users can add/update on the front end. It has one block type - contact - with 4 fields: Name (...
Todd's user avatar
  • 284
1 vote
1 answer
90 views

How do I eager load a dropdown field?

I'm going through my current project and making my loops more "eager". It's working great in several areas and improving performance massively but for some reason I can't get it to work when the ...
James M's user avatar
  • 35
1 vote
1 answer
125 views

Add Checked Attribute to Custom User Fields on Frontend User Form

I have a multi-select for users to sign up for newsletters. When they edit their profile they need to be able to see which newsletters they are already signed up for. I have the code to output the ...
Chattervast's user avatar
2 votes
0 answers
63 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 ...
Tom De Smet's user avatar
  • 1,456
1 vote
0 answers
174 views

Submit Dropdown with ajax

This works for me, but i would like to solve this with ajax without reloading the page. Choosing the values from the Dropdowns and submit the data per POST Method, so i can return the value with "...
TomS's user avatar
  • 213
2 votes
2 answers
506 views

How to create a user editable dropdown field?

Trying to figure out the best way of handling this scenario: We have a data field for a entry type that should allow an editor in the CP to select one option from many (ie. a dropdown). However, we ...
Mike's user avatar
  • 699
2 votes
1 answer
1k views

Select dropdown not going to option url

I have a pop up box on a siteplan image that includes a select dropdown to let people select the apartment that they want. However, I can't get the it to go to the url when it's selected. So need some ...
mention79's user avatar
  • 543
1 vote
1 answer
496 views

Reuse chosen dropdown field value on frontend

I would like to choose entry values from a frontend dropdown and reuse the chosen value directly. {% set entries = craft.entries.section('mountainbikes') %} <select name="year"> {% for entry ...
TomS's user avatar
  • 213
1 vote
1 answer
353 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 ...
Lukigi's user avatar
  • 565
1 vote
2 answers
436 views

Simple Search form with a few drop-down choices

Looked at countless examples here but all seem to be more than I need. I need the form to have three drop-downs Make -Ford -Chevy Color -Red -Blue Transmission -Auto -Shift And the search results ...
DevServe's user avatar
  • 303
1 vote
1 answer
33 views

How can I get spaces to render in my dropdown option label template call?

Example Let entry.dropdownOption.label = "option with spaces" {% for entry in entry.dropdown %} {{ entry.dropdownOption.label }} {% endfor %} renders as in my template: "optionwithspaces" How ...
mrtobo's user avatar
  • 43
3 votes
1 answer
239 views

Calculating a score based on a drop down field value

I am storing a value (number 1-5) in a drop down field and would like to do a calculation based on the numbers filled in. The only way I could get my calculation to work was to store the number (1-5) ...
Lori's user avatar
  • 866
2 votes
1 answer
865 views

Dropdown field 'default'

I have a field of the dropdown fieldtype, let's call it myDropdown. myDropdown has a list of options, one of which has the "default" checkbox checked. If I use a front-end form to submit a new ...
Philip Jones's user avatar
2 votes
2 answers
287 views

Using a Dropdown field in a Matrix to parse a global

I have two globals setup for affiliate and compensated type language - using Matrix and a dropdown I'm trying to find a way to let the user add this language in a new block. I cannot for the life of ...
FortySeven Media's user avatar
0 votes
1 answer
264 views

How can I get the correct label of a dropdown that has matching values?

I have a drop-down field in the CP - It represents a range of numbers that are based either a percent or a fixed number. For example, a choice could be Fixed 5% or a choice could be Variable 5% In ...
Damon's user avatar
  • 4,706
1 vote
1 answer
157 views

Find Dropdown Option Labels That Are Assigned in a Section

I can get a list of option labels available in a dropdown field using the code below. Is there a way to get a list of option labels that have been assigned to entries in a specific section? {% for ...
triplethreat23's user avatar
2 votes
1 answer
1k 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 ...
triplethreat23's user avatar
0 votes
1 answer
620 views

How can I populate a dropdown via table field type using the default values?

In the CP I have a table field called colors. I have two columns, "Label" and "Value". I have populated the table with two default values "Red" and "Blue" (attached). This table will ultimately ...
Damon's user avatar
  • 4,706
2 votes
1 answer
192 views

How can I merge entry values to create a select dropdown

For the life of me I can't seem to find an answer for this question, so here goes! I have a field called jobCounty in a section called jobs. The jobCounty is selected in the CP from a drop down list ...
Pathfinder's user avatar
1 vote
1 answer
519 views

Front end entry form drop down field

I'm trying to update a drop down field type on an entry using a front end form. However, the input is a hidden field (not a select) This is the form code I have so far: <form method="post" accept-...
user avatar
1 vote
1 answer
1k views

Conditional if statement for Matrix dropdown option

Ok, so I've tidied up the code a bit and using option.selected instead of option to see if the option is selected. But, it isn't behaving how I'd expect it: {% for telephone in user.profilePhone.type(...
Rob's user avatar
  • 865
3 votes
1 answer
708 views

Dropdown empty option

in order for my client to have the choice of selecting options or not, I entered an empty (blank) option in a dropdown field. In the frontend, I use this code: {% if entry.dropdownFieldHandle|length ...
jjem's user avatar
  • 497
0 votes
1 answer
665 views

Navigation drop-down problem

Doing my first site with Craft and UiKit framework I encountered a small problem with dropdown menu. Here is my code: <ul> {% set entries = craft.entries.section('spb') %} {% nav entry in ...
Stanislav Ulver's user avatar
2 votes
3 answers
3k views

Display list of countries in form using a dropdown

So I'm using this territories plugin to display a list of countries in a dropdown. The issue I'm having is showing these countries within my front-end entry form. I've used this example but it doesn'...
Jamie O'Hanlon's user avatar
1 vote
1 answer
602 views

How do I add an HTML tag to the formatting drop-down in the rich text editor?

I would like to add the 'code' tag to the formatting drop-down. My rich text field is using Standard.json and I am able to remove the current tags, but it's not letting me add additional tags. I have ...
Jeremy Dennis's user avatar
1 vote
1 answer
353 views

Outputting Navigation

I need some help with coding the navigation. This is the markup: <ul> <li class="active"><a href="#">home</a></li> <li><a href="#">about</a>&...
frshjb373's user avatar
  • 287
5 votes
1 answer
1k views

How do I output a dropdown's values if I'm on a registration form not tied to an entry?

I have a registration form on my website. All of the fields here so far have been text, which is no problem. However, I've just been asked to create a dropdown box for users to select their salutation ...
darylknight's user avatar
  • 3,290
15 votes
2 answers
4k views

How do I create a locale dropdown to switch between languages?

I’m trying to create a dropdown menu to switch between language’s on my site. I am currently doing this with this snippet found on the google plus community: {% block locale__switch %} {# Loop ...
simonsweeney's user avatar
5 votes
2 answers
458 views

Is there a way to populate a drop-down with the templates files in a folder?

When I have a folder setup for template partials, is there a way I could automatically populate a drop-down with the list of templates in that folder? This would be useful in the case where I have a ...
Steve Adams's user avatar
  • 1,671