Questions tagged [webforms]

One of the modules used for surveys, contests, personalized contact forms, or petitions is the Webform module.

Filter by
Sorted by
Tagged with
8
votes
9answers
6k views

Unable to send e-mail. Contact the site administrator if the problem persists

When my web form is filled and submitted, I get redirected to a page that says: Thank you for submitting. but theres a red warning box there that says: Unable to send e-mail. Contact the site ...
5
votes
1answer
2k views

How to create a node from a Webform using rules?

I want to create a node based on a webform data using the Rules module. This is because of a complication surrounding relationships within the associated CRM system. I am already at the point where ...
6
votes
1answer
2k views

How can I compare data comparison with values submitted in a webform?

I am trying to use webforms with the Rules module. How can I compare data with the values submitted in a webform ? For example, if the webform has a yes/no radio button, how can check the submitted ...
12
votes
2answers
24k views

How do I theme a webform? [closed]

I am in need to theme webform in D7. How can I do that ? In the search I've come to know that by using web-form-nid.tpl.php we are able to theme a drupal individual form. Could any one guide me in ...
6
votes
5answers
14k views

How to create a node with submissions of a webform?

I'm using Drupal 7 and created a content type 'NewArticle' with the fields 'Title', 'Text' and 'Image'. Users have the permission to create a 'NewArticle', but I don't like the way of displaying the ...
7
votes
1answer
3k views

How to implement a multi step approval with webforms/entityforms based on form components?

Is it possible to invoke multi-step submission workflow using either Webform or Entityform? Here is the scenario of workflows: An employee submits the form Superviser gets notification,...
3
votes
1answer
12k views

How to theme webform elements (radio buttons etc.)?

I would like to know how to theme Drupal 7 Webform elements? I want to change the HTML structure of every element, not just wrap form with div or something like that. And I want to leave theme's ...
9
votes
3answers
26k views

How to use [submission:values] in Email template in Webforms

I have the Webform 7.x-4.0-alpha6 version module enabled. I have a Webform node with 20 form components. I added one email in Email Setting and I created the email template where I used the token: [...
11
votes
2answers
14k views

Webform - Submit values from Drupal 7 from to external url

I am a self-proclaimed newbie to creating forms in Drupal. I have a form hosted on a Drupal 7 website (using the webform module) and need to submit the form values to an external url. I've been ...
4
votes
3answers
5k views

create drupal 7 webform programmatically?

I have already created a webform and I need to fill it programatically. how can I create webform ? Can i create it like node creation: $node = new stdClass() $node->type = 'webform' $node->...
2
votes
3answers
3k views

How to create a node out of a webform submission?

I'd like to be able to create a node out of a webform submission in Drupal 8. It can happen either on successful submission or as an additional task after the webform has been submitted. I've seen ...
2
votes
1answer
4k views

How do I submit a form via AJAX?

I'm using the Webform module for Drupal 8. The module confirmation settings for a form are the following: Page (redirects to new page and displays the confirmation message) Inline (reloads the ...
5
votes
1answer
16k views

Pass URL string to Webform text field

I have a webform (www.mysite.com/myform) ad I want to be able to pass a URL string to a text field in the webform when a user visits the page and submits it. For instance, the URL provided to "...
1
vote
1answer
11k views

Using webform rules to create node after webform submission [duplicate]

First of all, let me explain my project. I want users to place orders of products using webforms and then create a node with a link/reference to the submission and others custom fields. It looks like ...
3
votes
0answers
4k views

Node reference field in a webform [duplicate]

Are there any modules available or any procedures available so that node reference fields can be incorporated into a webform?
2
votes
1answer
1k views

dynamic options list based on the previous select box value

I have a webform. I want the second select box values to be loaded based on the 1st select box value. And these values should be loaded from DB table. Please let me know which hook i need to use and ...
12
votes
2answers
10k views

load a node content into a lightbox2 (without headers and footer and other blocks)

is it possible to load a node (from an id) into a lightbox 2 without having to load all the additional blocks ? just what the node has to display I want to make some popups on some links to allow ...
6
votes
1answer
2k views

Query webform submissions

I'm attempting to perform a query on webform submissions so I can display all submissions submitted by a specific user. However I'm not sure how to make this query. I made a guess that webform ...
9
votes
5answers
3k views

Webform does not submit, instead redirects to self

My soon-to-be production Drupal site's Webforms have stopped saving submissions; instead it comes back to the same page, complete with the inputted values. I do not have a timeline when it stopped ...
8
votes
1answer
2k views

How to prevent an Ajax form from submitting

The below code blocks any non-ajax form from submitting. $(this.form) .on('submit', function(event) { if (/* Some condition */) { event.preventDefault(); } }); In Drupal 8, how can ...
4
votes
3answers
5k views

select list in webform containing the list of node titles

how can we create a select list in webform containing the list of node titles of specific content type. I have a product content type through which I have added several product nodes. Now I want to ...
4
votes
5answers
9k views

How to I add a node reference field using the Webform module?

Is it possible to add a node reference field using the Webform module? If it is, how can I add it in my webform?
1
vote
3answers
3k views

How to access webform elements in webform.html.twig

I'm trying to figure out a way to access webform elements from webform.html.twig. I need to style the form; wrapping some elements and adding bunch of styles all I have in the webform.html.twig is "...
8
votes
3answers
18k views

How to set 'html' email template for webform email setting?

Is there any way to use html email for e-mail template in webform email setting? In my webform node I go to: node/113/webform/emails/1 to change the setting but I don't see any 'html' option. Look my ...
6
votes
5answers
22k views

Embedding a webform inside a node content

I need to embed a webform inside content, which is a node. How can this be implemented?
0
votes
3answers
6k views

How do I use Webform fields in a view?

I use the Webform module to get user information, and I want to use some Webform fields in a view; for example, I want to show only some of the fields (e.g. name and e-mail), and expose a filter for ...
6
votes
5answers
8k views

How do I modify a webform submission field right before it is saved?

When an end-user is submitting data entered in a Drupal 8 webform, I would like my custom module to modify a field that is on the same form based on values of other fields. I am having trouble ...
4
votes
1answer
2k views

Checkout page not found when order created through Drupal Commerce API for not authenticated (anonymous) user

I have the following code inside rules - action (being triggered by webform submission) <?php global $user; $product_id = 1; // Create the new order in checkout; you might also check first to // ...
4
votes
4answers
13k views

Programmatically get webform submitted field values

How can i print/echo the submitted value of specific field in from a webform? I need to do this in the webform 2 PDF module so i can better customize the output of generated PDFs. Im fairly new to ...
3
votes
1answer
2k views

Display image from Webform submission using views

I have created webform with title, description and upload file fields. And I have created views to display submission data in a grid view. For images, it just giving me the image name with URL to ...
2
votes
1answer
4k views

How do I programmatically update an existing submitted webform submission in Drupal?

I am attempting to use PHP in Drupal rules to update the values in submitted webform submissions. I can access and view the data correctly. When I assign a new value to a field it will even show up ...
2
votes
4answers
12k views

Webform redirect

I'd like to do something pretty straightforward: After user fills out a webform, I'd like a button that simply redirects them to a URL (in this case it's to a demo sandbox). Of course I'd want the ...
1
vote
1answer
459 views

preprocess_node_webform is not working

I wanted the error messages from the webform to be customised. So I wrote following piece of code in template.php of my theme. function sandesh_preprocess_node_webform(&$vars, $hook) { if ($...
1
vote
1answer
1k views

Adding class to the webform submit button

By default, the web form is displayed with <?php print drupal_render($form['submitted']); ?> . I need to make a small edit and add class="btn" to the submit button. I can change its value with ...
0
votes
1answer
457 views

Adding a “processed” flag to a Drupal Webform, that admins can use to indicate whether or not they've dealt with a particular submission?

We're using a Drupal Webform to accept customer requests for a free "kit" that we will mail them. This works fine on the submission side, but we'd like a simple way to look at the submissions and ...
6
votes
2answers
5k views

How do I programatically submit a webform via drupal_form_submit?

Drupal 7, Webform 3 I want to programmatically submit a webform via drupal_form_submit. However, I'm having difficulty finding a $form_state structure that works. I've submitted my webform via the ui ...
2
votes
2answers
9k views

How do I add custom validations to Webform?

I have created the country and state fields with the Webform module, and I want to add a field validation for the state field when user select US as country. How can I achieve this?
2
votes
1answer
387 views

How to send out email based on matching taxonomy terms in user profiles?

I'm using profiles 2 and have (one or many) taxonomy terms that can be selected by a specific profile type. I have a webform that also has this taxonomy term in the select list. When the webform is ...
2
votes
3answers
3k views

How to add CC to a webform email?

I'm using Drupal 7. Is it possible to add a CC to a webform email? I was using function theme_webform_mail_headers($variables) { $headers = array( 'X-Mailer' => 'Drupal Webform (PHP/' . ...
1
vote
1answer
138 views

Why isn't my custom Form API #states applied in my webform yaml editor working?

I have the need to set visibility state of a checkbox option in one question (Table checkbox select) based on the value of another checkbox in the same table. I also have other scenarios where I would ...
1
vote
2answers
236 views

Override webform module submit

I want to save webform submissions in node table.. I want to use the solution from "How to create a node out of a webform submission?". How can I implement it? I used hook_form_alter but it doesn't ...
1
vote
1answer
263 views

Create Nodes for multiple languages in webform?

I have a default Node for English, which will be translated when user logs in based on the user locale. Beside I need to create a separate node for ja(Japanese) like (mydomain.com/node/7). I created ...
0
votes
3answers
2k views

fetching records from webform_submitted_data table through following source code but showing error

How to display the records from the table by using the following source code? Notice: Undefined offset: 0 in eval() (line 20 of /var/www/module(80) : eval()'d code). <?php include_once(...
0
votes
2answers
607 views

Any way to flag users who previously submitted a webform on revisit?

My business team needs users who submitted a specific form to be flagged in order to allow them to gain access to a certain piece of content, which we've hidden behind a conditional check on whether ...
0
votes
2answers
164 views

Close a webform when total seats reach a maximum

I would like to know if it is possible to set-up a specific event registration webform to close automatically when the number of total reserved seats (reserved seats field) reaches a certain maximum. ...
0
votes
1answer
6k views

How to create User Account Registration form with Webform?

I am using Drupal 7. I have Webform with 6 fields: Your name User name password Email phone number Website If we submit it will store in database, but here I need username & password should ...
22
votes
10answers
12k views

Adding HTML5 placeholder to all drupal forms

I'm trying to add the placeholder attribute to all textfields across my website, but I'm having no luck. I've created a module that overrides hook_form_alter function mymodule_form_alter(&$form, ...
10
votes
5answers
18k views

How to configure webform with smtp

I have create a webform and i want to configure it sending emails with smtp authentication. I have install the SMTP authentication module also, but i cant find any option that allows me to setup ...
9
votes
2answers
11k views

How to submit webform programmatically with Ajax?

I'm working on an Ajax implementation for the Webform submit on Drupal 7. I was not able to find any good hook to alter the Webform submit button and add '#ajax' in the form so i had a look to a ...
6
votes
4answers
5k views

Programmatically get webform submissions of a specific nodes webform

In Drupal 8 there is no function webform_get_submissions() as of this writing. Webforms can be attached to nodes. How to get all the submissions of a webform that belong to a specific node (e. g. ...