Retrieves, populates, and processes a form.
0
votes
1answer
40 views
jQuery is not working for inserting data
I want to save data from a textbox on a button click. I am using jQuery AJAX for this task. Please note that I made this tags inside theme function.
function theme_user_post_block($vars) {
...
0
votes
1answer
28 views
how to add newsletter subscription during registration?
Here what I want to do. I loaded a checkbox list of taxonomy term on the registration form. Also I have a check box for "subscribe newsletter". so the user can check the his favourit taxonomy and ...
0
votes
1answer
28 views
How to add a confirmation form after the user clicks “Save” on a node edit form?
On a site I'm building, a user can edit certain fields on a node that cause a chain reaction to happen (which I've implemented using hook_nodeapi's "update" op).
Since this chain reaction potentially ...
1
vote
1answer
38 views
Submit handler: Prevent other handlers from running in certain circumstances only
I'm creating a custom module which adds a submit handler to a form. The idea is that it checks whether a hidden "honeytrap" field has been filled in.
If the field has been filled in, a success ...
0
votes
1answer
46 views
When in admin overlay, submitting form over 400 times
I have built a very simple module which just implements a block with a custom form. When submitted, the content is emailed to me. I show this block on the dashboard, and without the admin overlay it ...
0
votes
1answer
48 views
Add an action to user register form
On registration I want to get the value of the user's email and forward them to a page that has an option to resend their activation email.
I have the page with the form they're forwarded to, but I ...
2
votes
2answers
66 views
Trying to Understand Where I am Going Wrong Modifying User Registration Form
I am working with Drupal as part of a student project. As background, I work professionally doing front end development and I've taught myself at least the basics of the back end.
Here's my problem, ...
2
votes
1answer
22 views
2 submits with same validation?
I am modifying user_pass so that it also has an option to resend a user's activation email.
if($form_id=='user_pass'){
$form['name']['#title'] = 'Email Address';
$form['actions']['submit'] = ...
0
votes
0answers
60 views
PHP to create text field with default content from PHP command?
We have a block containing the code:
<?php print token_replace('[current-page:url]'); ?>
which does most of what is needed, which is just to mirror the URL of a unique views page containing ...
2
votes
3answers
63 views
Using form_set_error in the submit handler
I have a multistep form and on each submit I send completed fields off to an external API which returns data about the next step of the form.
The problem is, if I use form_set_error in the submit ...
0
votes
0answers
23 views
Drupal Ajax Form Rebuild Error Related to Exposed Form Plugin
I am submiting an Ajax form request in Drupal... It sends an Ajax request once a select is selected. The form rebuild has an error it states that the variable $exposed_form_plugin is not an object. ...
0
votes
0answers
21 views
How do I call another page, and output the submitted values in the new page? [duplicate]
In a login form, I will enter the credentials; on submission, the user will be redirected to a new page with the details provided in the login form.
How can I achieve this in Drupal 6?
0
votes
1answer
17 views
Creating a Form Uploader?
Sorry if this an extremely newby question but I am a beginner and still trying to learn how to navigate through the site. Anyway, I am trying to create a form uploader. For example, I want someone ...
4
votes
2answers
91 views
Multiple submit buttons: Which one was pressed?
This may be a duplicate of the following: Multiple form submit, but I am unable to figure out how the answer applies to my situation. So here is my go at asking this (I admit) quite similar question:
...
1
vote
1answer
36 views
Redirection to home page
I am working on a Drupal site. I have put a "Create an account" block on one of my content pages. After the form is submitted the user is redirected to the home page. I want to reload the same page on ...
0
votes
0answers
23 views
Using foreach() to get values from a checkbox form [closed]
I created a form on my Drupal 6 site where users have the option to choose multiple topics from a checkbox list. Here is what I am doing to try and output those values:
$i = 0;
foreach ...
0
votes
0answers
47 views
submit handler not working in custom.module?
I have a submit handler for a form im tryin to submit into webform submissions. i have the handler like this:
function custom_webform_submit($form, &$form_state) {
module_load_include('inc', ...
0
votes
1answer
48 views
prevent enter to submit form / disable enter
I am trying to prevent to submit the form when a user is pressing enter. I am trying to do so in a form that is also using ajax. I want to have the user click on submit after filling out all the ...
0
votes
1answer
51 views
Make custom form submit data to view filters
I have a custom-generated form on a page and it needs to submit data to a view on a different page. I'm currently trying to get this to work by passing the form #validate through a submit hook and ...
0
votes
1answer
47 views
Submit a custom form as a webform submission
I have a custom form i created using FAPI and i wanted to submit the values into the webform database table and/or content type as a node. i wasnt sure of the "drupal Way" of doin this. Here's my ...
0
votes
1answer
121 views
Drupal 7 form_state[redirect] does not work
I am new to Drupal development and I stuck on a problem.
I have got a form which I append to a node. The custom submit method is called correctly, but my redirect does not work. When I press the ...
0
votes
1answer
45 views
Webform 'Save draft' to send a mail with $sid
I am having a webform and I display the 'Save Draft' buttoan on the form.
Once I click on the Save draft I need to save all the values in the DB (as it does on Submit event) and should send an ...
0
votes
1answer
63 views
Programmatically submit form / save all nodes
After migrating all the content from a drupal 6 installation to a drupal 7 one, I ended up with empty fields in my nodes, that are displayed when viewing the node.
However if I edit the node without ...
0
votes
2answers
69 views
How to create user input dependent form elements?
I have created a form and it has multiple elements. Is there a way to show specific form elements depend on a slelect box selected value.
For an example my select box has 2 options. if i select option ...
3
votes
2answers
52 views
how to show html content when select box item selected
i have a select box called Delivery method and it has two options Drop off and pick up..,i want to load few extra html fields like size ,pick up address to the page when user select pick up ...
0
votes
1answer
34 views
How to automatically upload a file on form submission
I have created a form with a file attachment field. I have noticed that users will attach a file but sometimes forget to hit the upload button. I would like the form to automatically upload the file ...
1
vote
3answers
189 views
AJAX / AHAH 'Add More' Button on Unlimited Cardinality Fields Conflicts with Custom Submit Handler
I have a node add form with some integer text fields that have unlimited cardinality, which causes an AJAX 'Add More' button to be displayed for those fields. The form also has a custom submit handler ...
1
vote
2answers
103 views
How do I store the input value on form submission?
I made a simple form in a module with a textfield and a submit button. Every time I type something into the textfield and submit, when the page loads, the default value is in the textfield. I followed ...
-1
votes
1answer
181 views
Not saving field values to database using custom submit function [closed]
Specifically, my question is: what am I doing wrong such that the data entered into the various fields is not saved to the database when the form is submitted using the custom submit handler, but is ...
0
votes
1answer
23 views
Media selector returns value ZERO [closed]
I have a custom form for with media selector from media module. The form field is as below.
$form['image'] = array(
'#title' => t('Image'),
'#type' => 'media',
'#description' ...
0
votes
1answer
101 views
How to prepopulate drupal form and still execute a custom submit handler
I want to build a custom edit form for a existing node. The edit form should not show all fields and should be populated with the existing field values. Furthermore I want to add a few custom submit ...
0
votes
1answer
304 views
Drupal 7 #ajax callback on form submit
Hello I have created a custom form added a # ajax callback on form submit
$form['hotel_book_form']['submit'] = array(
'#type' => 'submit',
'#value' => t('Check Availability'),
...
0
votes
2answers
50 views
How can I throw a form error if a submission field has a certain value in webform?
I am using mymodule_webform_submission_presave() to alter some of the data before it gets saved.
I want to check if a certain select field has a certain option selected, dont save the form to the db ...
0
votes
0answers
44 views
Submiting webform to external database [duplicate]
I need some help, I am wanting to write a webform module that submits the data submitted from the form to a table in an external sql database.
This site links my previous question with a question ...
2
votes
2answers
131 views
How to create a webform submission table with values from the form itself?
I find the current webform submission table completely inadequate when forms are submitted by anonymous users - you can't tell one from another other than by its submission date which not helpful in ...
0
votes
1answer
109 views
Webform confirmation message alternate source
How can I override the default webform source for the form submission confirmation message and fetch it from a 'CCK' (I still can't remember what they are now called in D7) element instead?
0
votes
0answers
34 views
Can i submit a custom form using Webform Hooks instead of creating a .install file?
OK here's my problem i have a working form that i created with a custom_module. i now need to create a proper submit handler and/or a way for Web-form Hooks to handle the DB submission and show my ...
0
votes
0answers
38 views
Submitting forms by anonymous user cause all cached pages to be invalidated for current user
I am facing following problem with D7 - with core cache enabled (both settings set to 1 day) and all pages precached, I as an anonymous user visit a page with a form (comment form). After submitting ...
0
votes
1answer
32 views
How to create a Hook_Schema for Fieldset Form?
i have a form i would like to have the values submitted into a table in mysql database using hook_schema in a .install file. problem is i have no idea how to properly write it out being new to php ...
0
votes
0answers
34 views
Discard form elements
I would like to know if there is a way to simply not save elements from a form. I know that we can hide elements with hide(), or #type = hidden/value, etc., but I would like to remove then completely ...
0
votes
1answer
100 views
Send a mail from my custom module after custom form submit by user
I have made a custom form from a custom module. I need to send an email to the admin when user clicks submit. How can i achieve this. Can i use entities here..say like send mail to [site:mail] pr ...
0
votes
2answers
94 views
Custom form which on submit click inserts into the database
I have created a custom form in my module so that when the user clicks submit, some changes are performed in the databases and other actions follow. The form is an empty form with only the submit ...
0
votes
1answer
106 views
How do i use Webform API to submit my Custom Module form?
OK kinda noob-ish question but im unfamiliar with the programing side of Drupal... Im currently building a Form from scratch in drupal 7 (custom module since im using Form_Panel to arrange my form ...
0
votes
1answer
46 views
How do I save a managed_file to a user profile in a hook_submit
I'm trying to save a file that the user has uploaded using my form.
My form:
$form['fifth']['field_cv'] = array(
'#title' => t('CV'),
'#type' => 'managed_file',
'#size' ...
1
vote
1answer
299 views
How to hook into file upload and remove button
I am implementing a module (in Drupal 7) that allows the user to upload or remove a file using the managed_file form type. I have looked at the form APIs and it states that info about the file should ...
0
votes
2answers
86 views
Multiple forms and required fields affecting hook_form_FORM_ID_alter()
When creating a new content type, the $form_id is correctly picked up in my module. Let's say in my example, my form is called the 'foo_form'. The below hook_form_FORM_ID_alter function works fine ...
0
votes
2answers
56 views
How to display a newly created node (created using a form) in the view using ajax (without page reload)?
I have created a "Share update" form using form API. Below the form, I am displaying a view "feeds" of all the published nodes of content type "updates". On submit, the form saves the data entered in ...
0
votes
0answers
127 views
Sending JSON data on webform submission
To start off I would like to point out on a bit of a Drupal noob still. So bare with me please :). I would appreciate it if you can be very specific with your answers. Thank you before hand!
I want ...
1
vote
1answer
49 views
Drupal form menu
I have a menu callback, and I want to add a form on it using the following code.
function parking_calculator_menu() {
$items['admin/parkingcalculator'] = array(
'title' => 'Node ...
0
votes
0answers
85 views
Entity Form --> Submitted Data With Comments
Im attempting to create a website that has the following workflow.
Users (A, B, C...) can submit an item/product for review (if the product isnt already in existence in our site) using an entityform.
...



