for Silvestripe 3.1, user defined form.
I have defined a country dropdown list, it default value is US.
I have searched google, did not find any answer.
I want change default value it to Australia, how can i do that?
If you're talking about the "UserForms" module, then you can set defaults on an option by option basis, all within the CMS itself.
I'm not sure about 3.1, but I'm currently using 3.4 with UserForms v3.1.0, where you can go into the "Fields" tab, edit the dropdown field in question and select the "Options" tab. Now simply checking the box to the right of each option under the "Selected by default?" GridField column, should enable the desired default. I can't imagine it's that different in SS v3.1.
Related
I would like to have a dropdown list that has 100 choices available but I do not want anyone to see all available options. I would like for them to type at least the first 3 letters of the name of a choice and shows whatever starts with those letters as an option to select. How can I accomplish this in a Gravity Forms Form?
I have simply created the form with the dropdown with all of the available choices.
I would consider a plugin that allows for autocomplete. This way, you can preload your 100 choices: https://gravityextra.com/gravity-forms-advanced-autocomplete-field/
I have content type called news. I have a view thats lists all the news. But now I would like to filter those by year and type. User could select from select menu / dropdown the publish year (2010, 2011, 2012 so on) and also the type of the news (taxonymy terms).
I was playing around with views exposed but I only got a text input field. Can I somehow get a select menu instead of normal input field? And also how can I list all the publish years when news are published to that select menu?
Should this be done even with views?
====
PAGE
Filter dropdowns: -type- -year-
Press releaseses listed down here according the filters.
Select boxes will only be used in Views exposed filters when there is a finite number of possible values. In other words, if your field you want to filter on has something set in the 'allowed values' section you should have the option of a select box if you choose "FIELD NAME - Allowed Values" as the field to filter on in Views.
If your field has an unlimited amount of possible values, you could always write a custom module to create a block with a form that presents your select boxes and directs the user to the view (using the filter parameters of the view).
I've created a views of node and I've selected the "fields" option in order to select which fields to display and in which order.
Is there a way to group such fields ? It would be very useful to have parent divs in my html code.
thanks
There's a simpler way to do it: http://www.arsnova.cc/web-development-articles/2012-07-27/grouping-fields-together-drupal-views
Let's say you want to group fields 1-3 together within a div.
First, exclude fields 1 and 2 from display. (By "exclude", I do not mean to delete them from the views display; rather, click on the "exclude from display" button within each field's options.) The fields you exclude from display must come before the other field for this to work. If they don't, rearrange them so they do.
Go to field 3, and rewrite the results, inserting the token for each of fields 1-3.
That's all you need to do. Fields 1, 2, and 3 will now appear within field 3's div. If you want, you can also add additional markup within the "rewrite results" area.
Recently found the best way for my needs and apparently for the needs of many people:
Use views_fieldsets module https://drupal.org/project/views_fieldsets, it allows yo to create a grouping div to put fields inside.
Grouping is built into Drupal 8 Views. So no need for any extra modules. Here's how:
Edit your view (be sure it has fields)
Click Format's Settings
A box will pop up with all your selected fields
Look right underneath all the field names, there should be "Grouping field Nr.1"
Select the field you'd like to group by
Click Apply
If you want to subgroup with a second field, just go back to 2 then you'll see "Grouping field Nr.2"
That's it.
Yes, click on the gear next to the Style option (under Basic Settings) and set the Grouping field. Keep in mind, the grouping field needs to be added to the view, but you can check the Exclude from display option to hide it, if needed.
I'm pretty sure that would give you a parent div. If not, you could add the parent div, by overriding the default templates (look to the Theme: Information section, under Basic Settings, for more information).
I'm using Profile to add a "Department" field to user profiles.
I'm using Views to create a view of users, with "Department" being an Exposed Filter.
The Exposed Filter is a textfield. I'd like for it to be a select dropdown that is populated with all possible values.
Is anyone aware of a module that will alter Views filters, changing fields from textfields to select dropdowns?
Drupal 6. Views 2. The profile field is a single-line textfield (with autocomplete).
i had the same issue in a project
fields that are textboxes show be select box.
as attachment image shows in 'FILTER CRITERIA' choose your field
in 'Filter type to expose' part choose 'Grouped filters'
a table will be shown that you manually can add your data as options
this solution is good when you know your options
this is my RTL settings for expose a textbox filter
this is my RTL settings for expose a textbox options
and in UI - client side this field will be shown like this
What kind of profile field is "Department"? I'm assuming it's one of single-line textfield, multi-line textfield, checkbox or list selection. I only tested it with a list selection, but if you check "Force single" then the exposed filter will be a select dropdown.
Assuming you mean Drupal 6. The above is true with Views 2.x and 3.x on D6.
If you want to modify an existing filter, follow the accepted solution provided here.
If altering an existing filter does not satisfy your requirements, then this step-by-step tutorial will help you creating your own custom Views filter.
I have a special content-type that I have created, and one of the fields is a radio button list. The last element is named 'Other' and I would like to have a textbox appear and allow the user to enter in a non-defined value.
Is this sort of capability provided by any sort of module, or is this something that needs to be coded by hand? (If so, would you mind pointing me in the correct direction?)
The CCK Select Other module appears to get you most of the way there. I imagine it could be modified to work with radios fairly easily.