Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 6376

Use it for questions about the Form API. Don't use it for entity or entity field forms.

2 votes
1 answer
1k views

Drupal 7 Forms API radios value not saving to the $form_state array after submitting

I have a form where I am using radio buttons and when I use integers as the index, the form is saving and passing the value just fine. However if I use a string as the index it is saving nothing in th …
rf43's user avatar
  • 143
1 vote
Accepted

Drupal 7 Forms API radios value not saving to the $form_state array after submitting

My mistake! I am using AJAX to submit the form and selecting the radio button using the .attr() function. I was using an improper name in the element selector thus nothing was technically being sele …
rf43's user avatar
  • 143
0 votes
1 answer
1k views

How to properly add multiple form elements in a loop?

I have a form where I need to loop through an array and display multiple form elements in a specific area. Example: $form_layout = 'Some html'; $form_layout .= '<div>'; foreach($something as $key = …
rf43's user avatar
  • 143
1 vote
1 answer
2k views

How to place multiple form elements from a loop

In these rows will be textfields using the Drupal forms API. Example: $f = '<table>'; $f .= '<tr><td>Something... …
rf43's user avatar
  • 143