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
1answer
11 views

Get Webform Category Name in Preprocess

I am trying to get the Category name (from the General form settings) for webforms in a preprocess function, ultimately to add as a class to the webform wrapper. MYMODULE.module: function ...
0
votes
0answers
12 views

Put link/button in email to reply to sender on website

I'm having a bit of trouble figuring out how this is meant to work. What I'm trying to achieve is as follows: 1) I've got Webform module installed and working. Just has generic fields for now. 2) ...
-2
votes
0answers
27 views

Twig if statement does not work, as expected, in Attachment PDF

If statements generate an error when saving the Twig template in an attachment PDF complaining that the Elements (YAML) is not valid and it is unable to parse the line containing the if statement. ...
0
votes
0answers
13 views

Ajax webform: “submit” javascript event is not fired?

We want to track the event "form submitted" via Matomo. It is working for forms which does not have AJAX activated: Drupal.behaviors.donationFormSent = { attach: function (context, settings) { $('...
0
votes
0answers
15 views

reformat webform radio button

Using Drupal 7 webform, the standard radio button output is as follows: <div class="form-item form-type-radio form-item-submitted-X"> <input type="radio" id="edit-submitted-X" name="...
-4
votes
0answers
32 views

How to implement in drupal custom module [closed]

I am very new to drupal development. I want to create a Profile Page Which needs to show basic information as FirstName Last Name Email (Edit) John Michael ...
0
votes
1answer
26 views

The email doesn't have the DKIM signature it would get from mail()

My web host (HostGator shared server) normally signs outbound emails with DKIM. When I send emails from Drupal 7.69 (and Webform 7.x-4.22 for compatibility with CiviCRM), however, there's no DKIM. ...
0
votes
0answers
17 views

$form_state=>setErrorByName/setError on fieldset/container/etc

I have written a custom validation handler for webform that compares two fields. If the fields are in a container/fieldset/etc., I would like to set the error on the container instead of on the ...
0
votes
0answers
32 views

How to call rest api in Drupal8 After form submit

I created one internal api call as '/api/v1/user/promotional-emails' this api calls some external apis and we are updating data there. In postman api is working fine. Now i created a user form as '/...
0
votes
0answers
25 views

Setting Views contextual filter values dynamically with Twig in Webform

I am attempting to embed a view in a webform whose contextual filter value is set based on a user selection. I have created a view of nodes with a contextual filter, and a webform with a select ...
0
votes
1answer
24 views

Source entity type and id in webform node

Im looking for a way to set the source entity type and id to a webform that is inside a webform content type (webform_node) I followed the modal convention: the address of the webform is /webform/14?...
0
votes
2answers
35 views

Geting values for multipart form elements using Twig

Whereever you are, I hope you're fairing well under the circumstances. To some of the hardest hit areas, we are thinking of you constantly. Webform Advanced Elements I am having difficulty ...
0
votes
1answer
44 views

Block user upon one webform submission

I'm using Drupal 8, and I'm trying to block a user after submitting a certain webform. I have the below scenario: Only authenticated user can submit and use the webform Webform submission is limited ...
-1
votes
0answers
21 views

How can I render webfrom submission individual in webform-submission.html.twig?

Basically I am trying override webform-submission.html.twig. In this twig, I have these elements I want to render my webform submission with HTML structure for the theme. But I am not able to access ...
0
votes
0answers
22 views

when i scroll to a webform in my site a CDN overriding my local CSS [closed]

I have created a form using webform for newsletter displayed in the footer of my site. During scrolling to the footer when webform arrives my local CSS gets overridden by this CDN https://cdn.jsdelivr....
0
votes
0answers
13 views

Hiding the next page button in Webform after required question is completed

I am designing a webform (Drupal 8 webform 8.x-5.8) to serve questionnaires to patients and to ease the patients load of filling in questionnaires I would like to automatically advance the webform to ...
-2
votes
0answers
15 views

How to process confirmations on form/webform data apllied from 1 user by multiple registered/unregistered people

I am really noob to Drupal and I am looking for some tips about how to process to process confirmations on form/webform data apllied from 1 user by multiple registered/unregistered people. I haven't ...
0
votes
1answer
27 views

Extract email addresses from composite field type using Computed Twig

I am using a custom composite field type to gather multiple pieces of data from a user. This custom composite field type contains a field which gathers the email addresses entered. What I am trying ...
0
votes
1answer
40 views

How do you programatically determine who submitted a webform?

When I add a value element to a new webform draft and I attempt to prepopulate the element with a token listed as available, the element does not get populated.
0
votes
0answers
27 views

Custom webform validation handler not getting called using Event subscriber

I am trying to implement a custom validation for webform. I need to validate if user entered email is valid or not. For that I have altered the webform using event subscriber and assigned a validation ...
0
votes
0answers
12 views

Add new button with form_alter hook and AJAXify it

Is it possible to have form created via Webform UI and using hook_form_alter, add a Button, which calls ajax function? This is code from my hook_form_alter function. But ajax callback function is ...
0
votes
1answer
31 views

Why is my Ajax callback not returning anything?

I'm implementing an ajax callback function whats the issue with my code not returning anything. I'm new to backend <?php use Drupal\node\Entity\Node; use Drupal\Core\Form\FormStateInterface; ...
0
votes
0answers
16 views

How to fix malfunctioning “Other” option for textbox display on webform?

I'm having an issue with a textbox display on a webform. Whenever I click the the Other option the box doesn't appear. But when it's unchecked, it appears. option error gif link The solution I've ...
1
vote
1answer
34 views

Automatically load pending draft

I'm using drupal 8 and webform module (multistep). In the webform submission settings, i enabled submit several drafts which adds the 'save' button for saving the progress. When the user logs out and ...
0
votes
0answers
12 views

D7 to D8 Migrated webform is not detected in layout

I tried to add a webform that is migrated from drupal 7 site inside a layout for homepage. On adding the webform in a region, it showed error as "There are no entities matching webform_4" But the ...
0
votes
0answers
7 views

How to save webform submissions referenced in a Commerce Product Variation?

Attempting to use Webforms attached to product variations for certain administrative purposes. However, submissions aren't being saved, except for the first reference. The only saved submission's ...
0
votes
0answers
20 views

Webform disables machine name on new webform

Using the Webform module (8.x-5.8) on a Drupal 8 site (8.8.2), and have successfully created some simple webforms. Now when I try to add a new webform, the dialog does not update the machine name, nor ...
0
votes
0answers
27 views

Can't run database update script, webforms not display webform tab

We are running Drupal 7.69 under PHP 7.3.13 on Bluehost. Not sure what happened, but when I try to browse to update.php to perform database updates, I get the prompts as expected to update the ...
-3
votes
1answer
24 views

How to change the color of individual radio buttons in drupal 8 webform

I want to change the appearance of a Drupal 8 webform (version 8.x-5.8) radio element as per the options. Basically, the radio element is being visually presented as buttons and I was able to theme ...
0
votes
0answers
15 views

How to submit Webform multiple key field as individual entry

I have a webform with a multiple key text field. I would like to make the multiple value submitted as individual webform submission entry, so I can export them in csv later. I also have a custom ...
0
votes
1answer
17 views

Add hook form alter to create a list from MySql database in Drupal 8

I am creating a Drupal 8 form using custom content type. One of the fields to be created is a select list. The data that will be on the select list is stored in a MySQL database which needs to be ...
0
votes
1answer
53 views

Create custom form button that does not submit webform

I have webform created via Webform UI, and it's multi-step webform. In second step ('personal information') I add custom button using HOOK_form_alter with following code 'generate_pdf' => [ '#...
1
vote
0answers
42 views

How do I programmatically translate a webform?

Is it possible to add translation for webform programatically in Drupal 8. We have a webform with more than 100 questions and radio options. It is very difficult to manually add translation each time ...
0
votes
0answers
15 views

How to validate numbers in a webform custom composite element

I have a Webform with a custom composite, and there I have a element which type is Number and i want to validate this element. If I check required when the field is empty it show a message that the ...
1
vote
2answers
42 views

Drupal 8 webform 8.x-5.8 - how to show the previous step value in next step?

I have created a multistep webform and it has 5 steps. is it possible to get the previous step field value/data in the next step? for example, I have a field select list field (key = ...
0
votes
0answers
13 views

Client Side Validation library custom error and success elements

I am using Drupal 8 with the Webform and the Clientside Validation modules. The validator works fine, but it adds error and success classes directly to the input element. I want to create a separate ...
0
votes
0answers
23 views

Composite computed twig and conditional logic do not work in a form

I made a computed_twig and simle conditonal logic in a form and both work, then I copy the yaml as a composite, then I use (insert) the composite in another form but both (computed_twig and ...
0
votes
0answers
26 views

Where can I get dompdf_0-8-0 that include .info.yml files?

I am new to Drupal and can't get the download PDF feature working in Drupal 8 webform submission, getting the following message: Error generating document: Missing dependencies. Please install with: ...
1
vote
1answer
37 views

How can I get field labels from submission data?

I have created a custom webform handler by extending WebformHandlerBase. And I can get the data from the WebformSubmission. However, I can only get the machine name of the field. I would like to get ...
1
vote
0answers
30 views

Multi-step webform hooks

I have built a multi-step webform which has some field on first page (checkboxes, selectboxes etc.). I tried to access $form_state on second page in MYTHEME_form_alter where is checked if $form['...
1
vote
1answer
49 views

Entity Type Manager: How to retrieve webform entries with webform_submission_data conditions

I would like to get the webform entries submitted by a user with a particular webform_submission_data field value. E.g. field_account_type = "normal" How can I supply such a condition? $...
0
votes
0answers
30 views

How can I disable the default form validation error message?

I am using Drupal 8. When using "webform" module with the "inline form error" module, it shows both the validation error summary above form and each field error under the field. How to disable the ...
0
votes
0answers
13 views

Set placeholder for empty webform submissions values?

I found the "Submission Display: Single Item" advanced setting for webform fields and was hoping to be able to use it to override "empty" items on the submissions page. We'd like to use "N/A" here and ...
-2
votes
1answer
25 views

Drupal Webform View Form Submitted data to user [closed]

I want my users to view their submitted data after submission to let them know what they submitted. How can I do this? Please help!!
2
votes
1answer
25 views

Send email only if a field has a certain value

I am using webform in Drupal 7 and have a case where I need to send an e-mail only if a certain select field has an option selected. I have installed Rules and Webform rules but am a bit stuck on how ...
0
votes
0answers
21 views

How do I format the display and submission format of a datetime field in a custom composite?

on a Drupal 8 webform, I have a datetime entry which works fine and I can format it in settings. When I create a custom composite with a datetime in it, I don't have the same formatting options as ...
0
votes
0answers
12 views

Previous webform submission value available as confirmation message token

How would I render a previous webform submission value in the confirmation message using a token? Current webform submission value is easy e.g. [webform_submission:values:my_element_key] (I have ...
0
votes
1answer
37 views

How can I catch an EntityStorageException exception?

I have a custom Webform Handler that submits a webform to an external SOAP api. Once a user submits the form, the data is sent to the external api, my custom webform hidden field 'error' is updated to ...
-1
votes
1answer
8 views

Webform Query Confirmation Email Tokens Not Passing

Has anyone else encountered this behavior? I can pass static tokens but not values using [current-page:query:?] in the Webform 8 Confirmation URL. I'm trying to append an email address. If I use: ?...
0
votes
0answers
22 views

Is there a way to get tokens from webform fields?

I have a few hundred Drupal sites in which I need to submit webform submissions to multiple outside vendors via an email that contains XML tags. For example: <PREDEFINED_TAG_FROM_VENDOR>[...

1
2 3 4 5
45