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
0
votes
2answers
56 views

Webform Error Occurs During Configuration Import

Currently we are having some trouble handling webform module configuration on our various environments. When running a configuration import drupal config:import --directory=$SYNC_DIR on our dev ...
2
votes
0answers
61 views

Webform module loosing language for referenced options

First I have content type "Quiz option" which is translatable. Then I have a view that returns Entity references of that type. For language option I selected "Content language of view row" and also ...
0
votes
0answers
30 views

How to reference webform field option?

So I have webform module installed and I created a webform. Webform has an choice field (drop-down). Let's say you can select one of 3 options: "one", "two", "three". I need a way to add (editable) ...
0
votes
0answers
44 views

How to get the values of web form remote post handler?

i have created a web form handler ie. Remote post Handler. and i have gave one URL for posting the submitted data. How to access those submitted values in that particular page. How to GET ...
0
votes
1answer
34 views

Missing checkbox in Webforms settings

I ran the following command: $ composer require 'drupal/webform:5.4-beta1' Some of the components in the Extend section show updated version, while Webform (top one) still says 5.0-rc12. My ...
0
votes
0answers
48 views

Prepopulating composite webform field from data passed by POST

I need to POST a JSON to a URL with a webform on it and have the WebformHandler. This is the alterForm of my WebformHandlerBase subclass public function alterForm(array &$form, ...
0
votes
0answers
19 views

How set a custom redirect confirmation path to webform programmatically

i'm trying to set a custom URL to redirect when the process of webform submit is completed without use the confirmation settings of webform. I Actually try with this: $entity->setSettingOverride('...
0
votes
1answer
22 views

How do I get the email of the one submitting contact form in the “reply to”?

Drupal 8 site. I'm using the core Contact module for basic "Contact Us" form. How can I get the email of the person submitting the form to be in the From field? And a follow-up: How do I get the ...
-3
votes
2answers
28 views

Where can I set the default filter for webforms?

When I go to https://example.com/admin/structure/webform I would like to have the webform filtered by active ones. Where do I change that?
0
votes
0answers
16 views

Display an element based on user country

I guess this isn't a webforms specific question, but it might have been solved here before. I want to display an element based on the country that a user is from (based on GeoIP or Cloudflare / ...
0
votes
0answers
11 views

Webform default views missing “In Code”

I was looking in the error logs, and I realized that users cannot view submissions of webforms. I then realized that the webform views webform_analysis, webform_results, and webform_submissions were ...
0
votes
0answers
23 views

How to modify webform's setting by webform node's field value?

I have a integer field in the Webform Node content type, I want to modify the webform's "Limit total" setting base on the value of integer field. So I created a custom module, use hook_form_alter to ...
0
votes
0answers
11 views

Saving download settings as a template

I've just created my webform which I want to use as a template. I check the Allow this webform to be used as a template mark but upon checking the template I saw that my Results-Download settings have ...
1
vote
1answer
27 views

hook or similiar to automatically send any webform submissions to an email address, without manually adding a handler to each existing webform?

We have a Drupal 8 site running Webform 8.x-5.2. We have a special role, "Webform Editor", who is not a developer, but they are trained to create the webforms that we need for our organization. We'...
0
votes
0answers
15 views

How to attached a JS file to a Webform Custom Handler

I've written a custom Webform Handler which when the user clicks Submit, sends the data from the Webform to an external api. The handler is working perfectly but it takes a few seconds for the ...
0
votes
1answer
39 views

Webform submission ID

I have added a submit handler function in my .module file so i can execute some custom code when a form(webform) is submitted:- function mh_newsletter_form_alter(&$form, $form_state, $form_id) { ...
0
votes
0answers
8 views

Webform includes attachments only on manual resend, but not on initial form submission?

Using Webform and Mimemail to send HTML emails and uploaded files attached to emails. When submitting the form, the file is not attached to the email. The box is ticked: But if you edit the ...
0
votes
1answer
56 views

How to redirect to the webform node when it just created? [closed]

I followed the webform cookbook and created a custom module to "automatically create a Webform node when adding a Webform". Moreover, I need to redirect to the Webform Node at the same time, so I add ...
0
votes
0answers
51 views

redirect submission failing after 8.7.5 [duplicate]

We have a webform that uses a webformhandler to post the submission to our credit card processor. The webform works correctly when executed by itself, but when the form is embedded in a Secondary ...
-2
votes
1answer
48 views

How do I theme a webform email?

I have a subscription form created with webform. When the user submits the form I want to send a customised confirmation e-mail that includes some social links, images and site logo. I have looked for ...
0
votes
0answers
21 views

Creating new page from webform entry [duplicate]

I'm trying to create a webform that generates a new page filled with that submission data. So certain users can add/edit new pages easily. Is there a certain webform setting I'm missing for this? I've ...
0
votes
0answers
21 views

How to use webform tokens in mimemail Twig templates

I'm trying to send webform confirmation emails via mimemail. I managed to trigger the correct template file, but my problem is: How can I pass certain webform submission_values into the twig file of ...
0
votes
1answer
24 views

Block email from submitting webforms

I have a list of email addresses that I would like not be able to submit in webforms. I can't seem to find a setting for this? Is this currently possible or do I need to make a custom module to ...
0
votes
0answers
25 views

Webform Submission - Taxonomy Term ID Token

I have a webform that uses taxonomy term fields. After form submission I'm redirecting to a custom URL with query string parameters and using tokens for the values. The page I'm redirecting to ...
0
votes
1answer
119 views

How to add multiple “submit” buttons in Webform

If I add a button to a webform creating a module with something like this in it: $form['actions']['submit_2'] = array( '#type' => 'submit', '#value' => t('Submit 2'), ); It appears in my ...
1
vote
0answers
27 views

How can I filter submissions for download?

I have a query about the webform download options. /admin/structure/webform/manage/{{webform_name}}/results/download In my webform there is a field dropdown with some data like 'a', 'b', 'c'... ...
0
votes
1answer
27 views

Webform detect sender country automatically

We use Drupal 7 webform module. We want to detect the sender's Country automatically from the IP Address. Then based on the Country, the form is sent to another e-mail address. We do not want an extra ...
-1
votes
1answer
31 views

Is there a way to add Query string in URL after webform submission and remove the ?token from confirmation page

Actually, I would like to add ?sid=submission_id in the url except ?token=random_token_value after webform submission. Is there a way for that?
1
vote
0answers
22 views

Attaching webform to node

I have a question regarding the webform module. Is there a way to automatically attach a webform to a type of content? I have done something similar through adding it as a field in that content type, ...
0
votes
1answer
53 views

How can I load webform content inside a custom webform composite element?

I am using Drupal 8.7.3 and Webform 8.x-5.2. I created a custom composite field in a multistep webform by extending WebformCompositeBase. My users select a subject in an earlier step. In this step I ...
-1
votes
1answer
63 views

Automatically export submissions as PDF to a directory on the server, or external location

Background Drupal 8 have a great new feature: Ability to use entity_print to export submissions as pdf, and even to attach the pdf to email and send. Request Because of the sensitivity of some ...
0
votes
0answers
24 views

Get price value in Webform submission

I'm trying to create a webform that has an entity selection element linked to an entity reference view that has a selection of products from the commerce module listed. So far this has all been ...
-1
votes
1answer
62 views

Which hook can I use to retrieve form values after submitting a webform? [duplicate]

As the title suggests, I would like to know what is the correct hook for retrieving datas after a submission. The goal is to do a task based on the value of a data. Any help would be appreciated.
0
votes
0answers
21 views

Custom field validation condition not working

I have created a custom form validation. I am using webform module to build the form. in _achva_tz_validate function there are two fields that have the same validation. The second field, zug_id, is ...
0
votes
0answers
45 views

How do I make webform submissions available to Rules and loop

I have a webform application: five (5) questions/statements (Select Yes/No) for anonymous user usage. First result: all five (5) questions are answered "Yes" - the webform gets submitted, emails get ...
0
votes
0answers
19 views

Launch media browser with file webform component

I have webforms that only authenticated users can fill out and submit. I'd like the file component to launch the Media Browser instead of just the plain find a file and upload it. I've spent many ...
0
votes
1answer
35 views

How do I programmatically close webform by node date field?

Background: I'm adding an events (custom content type) & registrations feature to an existing drupal 8 website. My experience in drupal is pretty minimal. But I can find my ways around code. ...
0
votes
1answer
30 views

Is there a built-in “None of the above” checkbox option in webform? and how to create one?

I may be mistaken but I recall seeing such option in webform somewhere before and I don't seem to find it now (in case I'm right). I have several questions with big lists of checkboxes and if there'...
0
votes
0answers
22 views

Webform e-mail header

Not sure if I can explain this right, in any case here it goes... Having issues with rejected e-mail messages from the webform automatic e-mail generation. The messages are being bounced back because ...
0
votes
1answer
35 views

WebForm images not displayed after node creation with submission handler

I'm at a loss. I'm using WebForm 8.x-5.2 on Drupal 8.7.3. I have a custom webform handler that takes the submission and creates an unpublished node for review. The webform includes an image field ...
0
votes
0answers
13 views

What is the data key for a cell in a custom composite?

I am trying to figure out what the data key is in a custom composite table for specific cells. If I look at the YAML for a submission I see the following: data: dimensions: - length: '1' ...
0
votes
1answer
55 views

Which files do I need to edit to alter webform #states with hook_form_alter?

I need to create #states conditions between either the fields in any one element in a webform or across other elements in the same form. I'd hoped I could do it via the WF yaml editor but it seems I ...
0
votes
0answers
60 views

Calculate values in or from custom composite field

Is it possible to use computed token or twig to calculate custom composite fields? I have a custom composite field that asks for length, width and height. I would like to be able to add a 4th field ...
0
votes
2answers
137 views

How can I programmatically add webform elements to an existing webform?

I have a webform that is very simple, it's a questionnaire. It is attached to a content type called "event". e.g. discussion_1: '#type': likert '#title': 'Discussion 1' '#questions': '...
0
votes
0answers
19 views

In Webform 8 - can you omit the fieldset label in a confirmation email?

In Webform 8x I would like the email sent with the webform_submission_values to not include the fieldset labels. What would be the way to achieve this? Alternatively, is there a way to not send the ...
0
votes
0answers
31 views

Create custom webform when creating node?

I’m trying to find out if it’s possible to create webforms when creating nodes or paragraphs. I mean instead of choosing a predefined webform, then build it right inside the field. I figured that ...
0
votes
1answer
27 views

What is a “link template” in a token?

When configuring a webform submission URL by using tokens, I noticed this entry that specifies a link template: [webform_submission:url:?] The URL of the webform submission. Replace the '?' ...
0
votes
1answer
38 views

How do I pass a response from a Webform custom handler back to Drupal to display on the confirmation page

I have created a custom module for a custom Webform handler. The custom handler submits to an external SOAP api. There are various response options that are received back from the SOAP api that ...
1
vote
1answer
133 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 ...
0
votes
0answers
34 views

custom webform time and date elements id's

Using webform, I have two "Date/time" elements with popup date and timepickers enabled. I have a jQuery script to calculate and display detailed time difference between the values (date and time) ...