Questions tagged [forms]

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

Filter by
Sorted by
Tagged with
-4
votes
1answer
352 views

How to translate custom form (Form API)? [closed]

There is custom form made from FORM API . I want to translate this form . how to achieve this ? Please explain with proper example.
-4
votes
1answer
35 views

Calling Drupal Form from non-Drupal 3rd Party Website [closed]

I have an existing non-Drupal 3rd party site and I am trying to submit a form request to a site written in Drupal. For some reason, the request does not process. I'm not familiar with Drupal and would ...
-4
votes
0answers
18 views

Form alter the password modification [closed]

How can I alter the password modification ? function alter_form_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { if ($form_id == '###FORM_ID###') { } }
-4
votes
1answer
26 views

How do I get the dynamic elements value?

I wrote code to display fields, but I can't get all the entered values. function payroll_emp_form($form, &$form_submit) { for($i=1; $i<=2; $i++) { $form['foo_fieldset']['row_' . $i] = ...
-5
votes
2answers
317 views

How to create a custom login form [duplicate]

I need to know please any suggestion about how to create a custom login form for another type of users in drupal 8 , I have now /user/login is for administrator, but I need to add /account/login it's ...
-5
votes
1answer
77 views

How to get data from user? [closed]

Assume I have a skillbar module. Now it's simply create skillbar from tpl and value. How can I let users add their skill via form? I know I should use drupal_get_form, but I don't know how to ...
-5
votes
1answer
60 views

How to customize a form with php? [closed]

I want to put my form in a table. After some searches I've found this code. $form['city'] = array( '#type' => 'select', '#title' => $list_titles['city'], '#options' => $...