Questions tagged [webforms]
One of the modules used for surveys, contests, personalized contact forms, or petitions is the Webform module.
2,583
questions
23
votes
10
answers
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, ...
13
votes
1
answer
390
views
Webform-CiviCRM integration: autocomplete employer
I set up a Webform for a Membership Application. I followed the instructions on this page for setting up an Autocomplete for the Organization the new Member belongs to:
http://wiki.civicrm.org/...
12
votes
13
answers
14k
views
How to finally disable comments on content type?
I am trying to disable comments on webform.
I tried all settings I could find, but:
Link to comment form still appear
Name field and submit button still appear on comment form
Could somebody give me ...
12
votes
2
answers
26k
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 ...
12
votes
1
answer
256
views
Using Webform as an Application for membership/user roles
I'd like to implement the following on a Drupal site:
Anonymous site visitor (Joe) submits a membership application with various custom fields
Admin (Jane) reviews membership application
Jane ...
12
votes
2
answers
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 ...
12
votes
2
answers
2k
views
How to access values from earlier steps in multi-page Webform?
I'm using Webform 4. It uses Drupal's tokens, not it's own % tokens like it used to in version 3, and pretty much all what I found was about webform 3.
Say I want to make multi-page subscription form....
11
votes
4
answers
9k
views
How to programmatically duplicate a node?
I'm looking to create a copy of a webform I've made, with a new email address as the recipient.
After I load the node with node_load, can I just save it with node_save? Will that create a new node ...
11
votes
2
answers
15k
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 ...
11
votes
3
answers
3k
views
Display webform results data in a Google Chart
I'm trying to display webform results as Google Charts. I'm doing this on the theme layer by overriding theme_webform_results_analysis() on my theme's template.php file and using the Chart module. ...
10
votes
5
answers
21k
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 ...
10
votes
2
answers
7k
views
Can I move a webform to another drupal installation?
I have created a few webforms on our development server and would like to move them over to a production installation. Can I do this with node export?
I'm not concerned with migrate any user ...
9
votes
3
answers
21k
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 ...
9
votes
10
answers
13k
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 ...
9
votes
5
answers
20k
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 ...
9
votes
1
answer
4k
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 ...
9
votes
4
answers
15k
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. ...
9
votes
3
answers
32k
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: [...
9
votes
3
answers
5k
views
Drupal 7 Captcha in all webforms or per content type webforms
I am on D7.
I have a content type that is webform enabled.
Requirement
I need to implement captcha for all the webforms for nodes of this content type.
Problem
In D7, you are supposed to give the ...
9
votes
2
answers
6k
views
Submitting webform without refreshing the page
I have a webform displayed as a block:
Is it possible to submit the form without refreshing the page, followed by a message saying the webform has successfully been submitted? If so, could someone ...
9
votes
3
answers
4k
views
What happens to Webform data when a component is deleted? Can I change a component type?
I inherited a complicated Webform with several hundred submissions. One of the components was a Textfield used to capture the email address of the form submitter. For some reason this is a Textfield ...
8
votes
4
answers
14k
views
How to show webform as block
In drupal 7 we used to attach a webform to nodes and then we could render them as a block, nowadays in drupal 8 Webform is a dependent entity and is designed and developed on its own. now my question ...
8
votes
5
answers
4k
views
Create a webform which creates a user account
I'm looking to create a user registration form on a Drupal 8 site that has multiple clearly defined sections (possibly on separate pages).
I've explored doing this with the standard Drupal ...
8
votes
2
answers
9k
views
How do I translate the Webform module form?
I really see no way of translating the Webform module. Is anyone else facing this issue?
I know it is possible with locale (for the same node), or creating another node, but I really want to use the ...
8
votes
3
answers
9k
views
How to ajaxify webform submit in Drupal 7?
I have tried to alter the webform rendering using hook_form_alter() and hook_node_view() in a custom module so I could add '#ajax' somewhere.
Has anybody already had some experience working with ...
8
votes
5
answers
4k
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
2
answers
12k
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 ...
8
votes
2
answers
979
views
How do I include composer.libraries.json in root composer.json without using the wikimedia/composer-merge-plugin plugin?
In the recent update to Composer 2.0 the advice is to get rid of the wikimedia/composer-merge-plugin, which was even removed from the dependencies of Drupal core.
There is documentation on how to ...
8
votes
1
answer
195
views
Store Drupal 7 webforms in code
I am wondering if there is any solution to store webforms in code. So that you can easily duplicate them on other sites and bundle them with your own modules.
I am looking into something similair as ...
7
votes
3
answers
21k
views
Webform File Upload field
I'm using Drupal 8 with Webform module.
I want to allow users to upload one or several files when filling the form. Is it possible with Drupal 8? May be some additional module required for this?
7
votes
5
answers
26k
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?
7
votes
1
answer
4k
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,...
7
votes
3
answers
11k
views
displaying a webform in an overlay
I want the user defined webform to be popped up in an overlay when a button is clicked. I am using colorbox and colorbox-node modules. I am able to display the whole node. But I am not understanding ...
7
votes
5
answers
4k
views
Content Type vs Webform vs Form API vs Custom Form vs? [closed]
I'm currently working on a new Drupal 7 site, which will be used as a data collection and reporting site. After much research / trial and error / etc, I've decided to bring this question to this forum,...
7
votes
1
answer
2k
views
Upload multiple files through a single file dialog?
In a Webform, I want to let the user upload multiple files via one call of the file dialog. I found the following modules.
Webform Multiple File Upload
Webform Multiple File
With either of them, I ...
7
votes
1
answer
1k
views
Multisteps Webform loses current page when refreshing browser
I've created a Webform with three steps. When I refresh the browser (F5) on step 1 and 2, I correctly remains in the same page.
If I do the same in step three, I go back to step 2. For ALL the steps ...
6
votes
4
answers
16k
views
Programmatically Render a Webform
I'm attempting to render a webform inside a block plugin. I'm able to successfully retrieve the webform using the following code
$webform = \Drupal::entityTypeManager()->getStorage('webform')->...
6
votes
2
answers
9k
views
Load webform submission
How can I load a webform submission programmatically ?
I've tried : $webform_submission = WebformSubmission::load($sid);
but it return null.
I do this in a custom module call by an handler after ...
6
votes
2
answers
4k
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 ...
6
votes
2
answers
6k
views
Webform User Contact Form in Block
I cant seem to find any solid info on how to do this in the Webform module, is there a function or a module that goes with webforms to do this?
Thanks
6
votes
5
answers
16k
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 ...
6
votes
2
answers
400
views
How to Configure WebForm to Allow Users to Choose Which CiviCRM Campaign to Contribute to?
Our non-profit currently has a basic donation page via a CiviCRM Contribution page. We would like to add the ability for the user to select which campaign the contribution is directed to.
The Webform ...
6
votes
1
answer
9k
views
Drupal 7 webform module is not sending email properly
I have this modules enabled in my Drupal 7 site:
Mail System v7.x-2.34
Mime Mail v7.x-1.0-alpha2
Smtp Authentication v7.x-1.0
Webform v7.x-3.19
I have configured Mail system to "format" mails with ...
6
votes
1
answer
2k
views
Add type='tel' attribute to webform field
I want to add the html5 tel attribute to a particular field in my webform form in order to prompt mobile devices to display the appropriate keyboard.
I was trying this:
function my_module_form_alter(...
6
votes
2
answers
2k
views
Dynamic webform recipient
I am developing a site which has many advertisers. The idea is to have a specific advertiser emailed when a user shows interest in their product.
To do that, I need to create one webform which will ...
6
votes
2
answers
6k
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 ...
6
votes
2
answers
4k
views
Adding a custom Token so i can use in Webforms
I am having the smart-ip module installed. It allows me to get User country, city etc very easily like this:
echo $_SESSION['smart_ip']['location']['country_code'];
I want to use this as a token ...
6
votes
1
answer
3k
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
2
answers
1k
views
how to enable access to a webform only from a link sent to user
i'm planning to create a form with the webform module on D7.
i would like to be able to send via e-mail a link to that webform, but only those who receive that link (non-registered users) could access ...
6
votes
2
answers
2k
views
How can one automatically rename files uploaded in a webform?
I would like to rename the files uploaded to a webform according to some tokens or the value in some other field.
I did some research on this and was surprised to find no definite solution.
For ...