Form submission is the operation for which the data user input are going to be processed.

learn more… | top users | synonyms (1)

0
votes
0answers
10 views

Unable to access form values after submission

I have built a HTML table using the following snippet in function _orb_can_display_act_form() { . . $form['bookingtable'] = array( '#type' => 'tableselect', '#header' ...
1
vote
1answer
27 views

Submit button not triggering a form submit

I have a strange phenomenon. The code seams to be correct but the submit button is not triggered. dpm says the callback functions are loaded correctly in the $form value like this: When I pressed ...
-1
votes
0answers
20 views

validating select filed [on hold]

function add_property_property_form_validate($form,$form_state){ $property_name = $form_state['values']['property_name']; if (trim($property_name) == ''){ ...
1
vote
2answers
89 views

How can I implement AJAX form submission?

My task is to submit contact form via AJAX and then to show "Thank you for submission!" message, loaded in place where the form was. So I need to ajaxify existing contact form. I found some examples ...
1
vote
1answer
22 views

hook_form_alter help (almost there!)

There are two parts of a third-party module that I am trying to alter. When the user clicks submit When the user clicks reset This is the function from that module. function ...
1
vote
2answers
45 views

Display results of a form

I am trying to find a simple way to display the results of a simple checkbox form on the same page after submit. I know you can use the drupal_set_message, but I want to display the results formatted ...
0
votes
0answers
10 views

Save node from serialized javascript form

In a node with aprox 500 fields, I need to submit just 7-10 fields. I've tried to submit the form with ajax POST with no success: the user is not logged in and permissions are not given to edit ...
0
votes
1answer
27 views

Render form with ajax submit.

I have a custom form in a module, similar to this example: function mymodule_form($form, &$form_state) { $radio_options = array(...); $form = array(); $form["wrapper"] = ...
0
votes
0answers
15 views

Use hook_webform_submission_presave () to edit the SID of a Drupal webform

I'm working with Drupal 7 and I've created a module called uvic. What I'm trying to do is to restart the SID when a form is cleared but it isn't working, what I'm doing wrong? function ...
0
votes
1answer
17 views

Managed file input is removing input values of appended input fields by ajax

I have a form with checkboxes that are calling ajax callback on checked. This ajax callback is appending another inputs: $form['expertise']['op-cat-'.$op_cat['id']]['op-'.$op['id']]['checked'] = ...
0
votes
0answers
23 views

hook_form_submit no results

I have a form in Drupal 7 and I want to insert some data in a database. It is a form with a lot of checkboxes with different ids,.. I want to check what data is submitted. If I use ...
2
votes
2answers
45 views

Add button to view form and accessing nid in submit function

I need one button at the end of one content type view form. This button should redirect the user to another page. I have something like the following code: function mymodule_node_view($node, ...
0
votes
1answer
32 views

form_submit hook not firing

The title says it all. I've created a form, but the submit hook isn't triggered once the form is submitted. <?php //Create raffle form function raffle_create_form() { //Basic raffle info ...
1
vote
0answers
19 views

Why drupal_get_form will reset variables?

I would like to implement a simple searching form. When the form is posted, the searching result will be shown before the form. The page callback is as following. $output have content at the first ...
0
votes
1answer
43 views

How can I use entity save in drupal 8 [closed]

I'm installed drupal 8 in local and created a content type named as Project with minimal fields. And implemented form API to collect data in custom module. Here how can I save the data as node ...
0
votes
0answers
9 views

Issue form submit after ajax_command_replace

I have an issue with sending a form. I have a form with some containers and 2 selects fields. The selects fields call the same callback who use "ajax_command_replace" to add some others fields and a ...
0
votes
1answer
28 views

remove email field from registration form

From core\modules\user\src\AccountForm.php, user module developer added following comment to Email fields. // **The mail field is NOT required if account originally had no mail set** // and the ...
0
votes
2answers
35 views

Inserting data to external DataBase

i'm trying to insert data to a different data base that i created. I've read a lot in the forum, the support documents and other pages but i haven been able to figure it out the problem, can someone ...
0
votes
1answer
46 views

8 - tabledrag submit - $form_state missing values

I have built a draggable table using this tutorial (halfway down page is the Drupal 8 code): https://www.drupal.org/node/1876710 In the submit function I would like to look through all the rows and ...
0
votes
1answer
32 views

Custom form validation

I've created a custom module for populating a database and now I need to apply form validation to this form. I want a few different validation things to happen. I want to limit specific entries on ...
0
votes
1answer
31 views

Use value from buildForm() in submitForm()

My buildForm() method queries the database and returns data which is used to calculate default values for the form. How can I use these values in submitForm() without querying the database again?
0
votes
0answers
15 views

How to alter form submmision response text

How to alter form submmision response text code below: <?php function response_form_alter(&$form, &$form_state, $form_id) { if($form_id == 'cmis-upload-node-form') { ...
1
vote
0answers
39 views

Multiple AJAX submit callbacks

Here is what I'm trying to do. When someone clicks on the "Apply special code >" button, it makes an ajax callback and inserts a textfield and submit button below it (works as planned). However, as ...
0
votes
2answers
28 views

How to get $form_id based on $form_state for custom form rule?

I'm building custom form rule which is having $form_state as rule input parameter, however I would like to use drupal_form_submit() which requires $form_id. Is it possible to fetch/compute ...
0
votes
1answer
52 views

User password reset - redirect one time login to another page

By default, if user submit his email in form at /user/password page, he will recieve an email with one-time login link. After opening this link he is redirected to page with form with one single ...
1
vote
2answers
61 views

form_state->setRedirect(to_a_new_node_page) from the submitForm function, route “does not exist” issue

I created a custom module, It generate a custom Form in a page. When I submit my form, I create a new node. So, I am redirect to the form page but I would like be redirect to the new node page. I add ...
0
votes
0answers
57 views

When setting existing date field programmatically date is AM instead of PM - interpreted as 24 hour time [on hold]

I have an existing date field in a custom content type, called a 'journal entry'. I am programmatically creating nodes of this content type in a custom module. I used the Date module to create a ...
0
votes
0answers
15 views

How do I get form submit buttons to display in panels/pages?

I've got a custom content type, and I want to display save buttons at a few different places in the form. I already created a page edit variant for this node type, added fields there and added form ...
0
votes
0answers
15 views

How to make text-box default value empty when checkbox is checked?

I am trying to set default value of a text-box null when checkbox is enabled. Here is my code. $form['no_information_needed'] = array( '#type' => 'checkbox', '#title' => 'Please ...
0
votes
0answers
16 views

Print success message only if field is altered [duplicate]

I have created a checkbox in user edit using form alter and based checkbox state I want to print the message. For this I used below code function module_form_user_profile_form_alter(&$form, ...
0
votes
1answer
7 views

Static form to print on TPL

I have created a module i can use to create multiple blocks, now with one of those blocks, there is a requirement for a form (which the user needs to be able to see). However, this does not require ...
0
votes
0answers
6 views

hook_form and jQuery filtering

I'm creating my own "filter form" with hook_form in a custom module and want to use this form to filter mortgages which appear in another div based on specific criteria. I'm having trouble applying ...
1
vote
1answer
43 views

Print message only if checkbox field is alter using form alter

I have created a checkbox in user edit using form alter and based checkbox state I want to print the message. For this I used below code function module_form_user_profile_form_alter(&$form, ...
0
votes
3answers
38 views

Form submission not working in template file

While theming form in template file I used drupal_render to print selected fields of form. But after hit submit button, data is not saving, means submit button is not working. I know one solution is ...
0
votes
0answers
24 views

drupal_get_form in a condition won't trigger the form submit

I'm trying to understand why when I call a form through drupal_get_form the submit part of it reload the page and if I don't call the form with drupal_get_form on that page again, it won't trigger the ...
1
vote
2answers
62 views

Form with Ajax and without

I am constructing a form that is handled via Ajax. I need it to be avaible on browser where javascript isn't activated. For now, the submit part is like : $form ['submit'] = array ( '#type' => ...
0
votes
1answer
47 views

Hide Fieldset in an Ajax Callback Function

I have this code below: function myid_templates_form($form, &$form_state){ $form = array(); $form['create_template'] = array( '#type' => 'button', '#value' => ...
0
votes
1answer
37 views

How to force forms only through your own submit functions?

If I want a custom submit handler, the usual answer is to add the function call to $form['#submit'], and if need be, $form['actions']['submit']['#submit']. The standard warning is do something like ...
4
votes
1answer
56 views

In which cases should I not call user_access() in a form submission handler?

Reading the code for user_register_form(), I see the following comment: Pass access information to the submit handler. Running an access check inside the submit function interferes with form ...
0
votes
1answer
57 views

formBuilder()->submitForm() not working

In Drupal 8, I'm getting an exception 'InvalidArgumentException' with message 'The form argument system_theme_settings is not a valid form.' The story is: I can't add custom colors to my installation ...
0
votes
0answers
16 views

Webform confirmation request more details

Is there a way to request more details after a webform has been submitted and append to the same user asked. An example. Request: Name Request: Email After submit taken to confirmation: Thank ...
1
vote
2answers
31 views

$form_state Drupal question [closed]

I'm sure that my question is pretty noob. I'm new to Drupal. I'm trying to test a search student customer using form and search in database. Can someone tell me whats wrong with my code. function ...
0
votes
0answers
47 views

CTools Modal AJAX Webform onchange submit problem

I want to submit form on radio button change, it works, but form is submitted twice and i got JSON error on confirmation page. I'm using this function: function surveySubmit() { ...
0
votes
0answers
17 views

Reset dropdown for country when US radio is selected

On page load, the U.S radio option is selected and the states dropdown is made visible. When I choose the International radio option, I show the country dropdown. When I select the country dropdown ...
0
votes
0answers
17 views

Profile 2: edit each field individually, instead of one long edit form

Is there a way to allow users to edit each profile field individually as it's being displayed on their user page? This would cut down the number of menu items leading to long edit forms. My goal is ...
0
votes
1answer
159 views

Why is my custom webform submit handler not submitting?

I've looked at a number of posts, but none of them have quite the same issue as I am. I've added two custom submit buttons to a webform (in addition to the default one created by the admin page.) My ...
0
votes
1answer
22 views

Making an Entityform field required using jQuery

I have an Entityform and defined dependencies to where if a particular value is selected from one of the drop downs, the resume field (file upload) should be required. I don't know why, but it's ...
0
votes
1answer
159 views

Error: Argument 2 passed to drupal_array_get_nested_value() must be of the type array, string given

I'm using Entityform with some custom module for multipage which is based on FGAM. Recoverable fatal error: Argument 2 passed to drupal_array_get_nested_value() must be of the type array, string ...
0
votes
1answer
50 views

My custom Save button does not save the new form values

I added a custom button to my form which I want to call a function which grabs some values from that form, email them out to whomever, and then save the form. I have successfully emailing the value, ...
1
vote
0answers
33 views

How do I create a comment programmatically in drupal 6?

I have a comment form which gets rendered below the content type on content page. I have a comment form and comments being rendered as well. Now the question is that I have a custom form that takes ...