The states tag has no wiki summary.
1
vote
1answer
28 views
using drupal_process_states()
I'm trying to add dependencies to a set of fields, such that only one of the set can ever contain a value at any given time.
I see that drupal_process_states() does pretty much what I want, but I'd ...
0
votes
0answers
37 views
#states form with data_popup and select fields type
I'm creating a module with a form using the API form. The form have two field types: the first a date_popup type, second a select type. I need that when the users pick on sundays in the calendar popup ...
0
votes
0answers
53 views
Drupal 7 FAPI - Using form #states with Skinnable Checkboxes and Radio Buttons
I would like to create a more organized and beautiful form using the following code http://codepen.io/jackncoke/pen/cdqCb (http://cdpn.io/cdqCb )
but #state feature does not work with it or even ...
1
vote
1answer
67 views
#states in add node form
How to use #states in add node form?
I don't experience any problems when use them with exposed filters (on user side), but cannot do the same when additing new nodes.
I tried the following code:
...
0
votes
1answer
63 views
#states doesn't work with exposed filters
I have two exposed filters Contry (name=field_country_tag_tid) and City (name=field_country_tag_tid_option_limit). Reference limit option Module limet avaliale options in city but not when page with ...
0
votes
1answer
69 views
Trigger #states via custom jQuery
I have a form using #states which is great, but once a hidden field is made visible I would like the user to be able to hide it again by clicking a close button, rather than deselecting the original ...
0
votes
0answers
103 views
How to make #states work when dependant element is modified with JS .click()
We have custom JS that changes the value of some radio buttons using .click() and we have #states defined in other form elements that react to changes in those radio buttons.
The #states work fine ...
0
votes
0answers
165 views
How to use #states disable on the textfield after touching the button
This is the program i wrote.
i want user to enter the data in the textfield and then touched the ajax button.
After touching the button,the textfield will be disable. How can i do that?
...
0
votes
0answers
76 views
how to add #states property to an $element of the custom field in drupal 7?
i develop a custom field and have some errors on property #states.
The method of using #states in $element is quiet different with the $form.
The code i write is below.
function ...
0
votes
1answer
60 views
Array value operators
I'm trying to get the select field below only to show only when the value of the platform field is 4 or greater. Is it possible to nest an operator within the array statement? The code below works if ...
0
votes
0answers
159 views
More complex #states expressions
I have peeked into a bunch of modules and Google and the "Examples > Form" example but found no answer as per: how do I define visibility condition in #states depending on a several value conditions ...
3
votes
3answers
768 views
how to add #states property to a field element in drupal 7?
I wanted to add #states property to a select list field in cck input form created by content type. I ve tried the following code but the states property is not set to the field. Can anyone suggest on ...
1
vote
1answer
519 views
Disable submit button if none selected using #states
The code
$form['type'] = array(
'#type' => 'select',
'#title' => t('Type of new field'),
'#options' => $field_type_options,
'#empty_option' => t('- ...
3
votes
2answers
467 views
Dynamic Form Elements state with multiple conditions
Can someone please help me figure this one out. I have a form element that is dependent on certain values from another select. It is only visible if certain values are selected. I know i can do ...
1
vote
4answers
427 views
Addressfield: format US state as two letter abbreviation?
Using Drupal 7 with Address Field module. How do I get the US state (i.e., the administrative_area) to show as a standard two letter abbreviation rather than the full state name?
What shows now is:
...
3
votes
3answers
915 views
Hide a CCK fieldgroup using #states in hook_form_alter()?
I have a custom module, and I am trying to hide a CCK fieldgroup using "#states" when a certain item is selected in a drop-down select list.
I have tried using states from within hook_form_alter(), ...
4
votes
1answer
1k views
How to make a form required with states?
I have a drop down list that displays various fields based on what is chosen and I know that I can toogle the visibility with states but when I try to use required the * span is display but it isn't ...
4
votes
3answers
501 views
How can I slideDown with #states?
I have a form using "#states" (in the Relation module), and it works, but it kind of jumps around. A nice slideDown would be so much better.
How can I do that instead of just making it visible?