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
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
33 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
18 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
40 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
28 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
29 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
18 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
50 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
22 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
51 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
14 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
25 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
32 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
42 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
33 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
51 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
49 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
26 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
25 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
15 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
47 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
10 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
23 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>[...
0
votes
0answers
19 views

Webform Confirmation Page URL alias tokens

From several things I have read, it seems like I have this correct, but it doesn't seem to be working. On my form settings page under "Confirmation page URL alias", I have: /quote/thank-you?loc=[...
0
votes
1answer
56 views

How to render element array piece by piece

I have template form.html.twig Drupal commerce is using it to render cart form. I made override of that template, to be able to change it only for cart form, without affecting other forms. That part ...
0
votes
0answers
21 views

Webform using latitude and longitude from algolia places as context parameter for entity reference view

I have a webform in which I use a location field (algolia places). By typing the address into the field I'm getting the latitude and longitude values provided by the library. Now I want to start a ...
0
votes
0answers
13 views

How can a user jump to a specific page, and preferably to the last page they were on? Webform 8.x

My customer has two 21 page forms. It is unlikely that anyone will be able to complete the whole thing in one sitting. I have turned the draft feature on. It would be really nice if they could return ...
0
votes
2answers
51 views

Download file after filling a form [closed]

On my site, the visitors can download whitepapers as pdf. I would like to gather some information before handing over the file. Updates: the downloads should be open to unregistered users What I ...
0
votes
0answers
29 views

How to print multi step webform current step number from webform page template?

I have template named page--webform.tpl.twig which is kind of wrapper for multistep webform. I would like to print current step of the webform from that template. Is there a way to access current ...
0
votes
1answer
33 views

How can you prepopulate a field based on another field's value?

this one was easy in Drupal 7. I defined a condition "If field A has value B, then field X will automatically get value Y". How can I get this working for a Drupal 8 webform?
0
votes
0answers
28 views

prevent webform reloading the page on submit

I have a web form block displayed in a custom modal, Is it possible to submit the form without refreshing the page, followed by a message saying the webform has successfully been submitted? I've set ...
0
votes
0answers
39 views

How to add autocomplete tag in Webforms module

According to the accessibility guidelines fields like email or name need to have an autocomplete tag like, autocomplete=on. I found the option to turn autocomplete on and off in webforms in the ...
0
votes
0answers
17 views

Skip form steps

I have created a drupal multistep webform and for smooth page transitions and better server load, etc i am using the module webform_ajax. On my webform i am using a progressbar which is similar to ...
0
votes
0answers
22 views

“Add another” for many fields together, but collapsible

I need to collect information about multiple people - an unlimited number. So this means I need an "Add another" capability. [Think Field Collection or Paragraphs.] The only element I see that has the ...
0
votes
0answers
14 views

Column Select Option not available for csv download in drupal 8 webform

I'm not able to find any column select option to download my drupal 8 webform submissions in csv format. But if I select HTML Tables, then I get the Column Select Option dropdown. Is there any other ...
0
votes
0answers
16 views

8 - Use Webform character/word count outside of Webform

I'm trying to add a word count to a textarea in a node edit form. We also have webforms which has this built in. But it doesn't seem like it'd be easy to apply that to a textarea field outside of ...
0
votes
0answers
22 views

Webform submissions taxonomy term view

Working on a new Drupal 8 site. I have a taxonomy vocabulary called Affiliates, and all users are tagged with a single Affiliate. I'd like to create a view that shows all webform submissions for that ...
1
vote
1answer
46 views

Use Webform as Module Config Page?

I am building a module that will create webforms for use with the Commerce Webform Order module. These must be somewhat constrained in their structure, so I have developed a form (using FAPI) to ...
0
votes
0answers
23 views

Solution for Job application form with file using NUXT + DRUPAL

Ok, so I am working on a project (Using NUXT.JS for frontend) for a company where I need a job application form. I am using Drupal as headless CMS. Everything is fine so far. I have created multiple ...
0
votes
1answer
24 views

Email by Taxonomy Term

For Drupal 8 webform, I see there's a way to specify custom email recipients based on a Select component. But I don't see a Taxonomy term reference as an option in the email handler. Is there a way to ...
0
votes
1answer
40 views

Route not found error when using webform_rest to upload files

I want to upload a file using webform_rest API as described here. #2899902. But it gives me 415 Unsupported Media Type error as you can see in the screenshot. Here is my code methods: { ...
0
votes
1answer
113 views

How can I access webform submission values from webform-confirmation.html.twig

I have a webform with Inline confirmation, AJAX enabled and saving of submissions disabled. Is it possible to access the submitted values from the webform-confirmation.html.twig template? I know ...
1
vote
1answer
30 views

What is the proper way to show a visitor an error?

I'm using a custom submit handler for a Webform, which POSTs important form data to another API. That part works, but on occasion there may be random network errors that prevent a successful ...

1
2
3 4 5
45