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
-1 votes
0 answers
11 views

What is the correct way to delete a webform

I followed the simple approach to delete specific webforms from my website Delete the webforms in local Take config export for the deleted webforms (for all languages) and commit them Take config ...
user avatar
  • 125
0 votes
1 answer
13 views

Webform 4 passing in email token into the redirect url confirmation page

This is for Drupal 7 and webform 4. I'm trying to pass in an email token value submitted from the previous webform page into the confirmation url. But it shows up blank. And the token browser dialog ...
user avatar
0 votes
0 answers
5 views

Entity print webform submissions - print single values in twig

When customizing a PDF with entity print, are the submitted fields available in twig within e.g. entity-print--webform-submission--contact.html.twig or do I have to preprocess them? If they are ...
user avatar
  • 160
0 votes
0 answers
13 views

Webform email interface - accessing submission values

I need to send an email to clients who are registered through a webform, by grabbing their entered email as follows: But I get this error: How can I access individual entered emails in the email ...
user avatar
0 votes
0 answers
11 views

can you control access at the web-form submission level

I have an existing system using the groups module. Can I add individual web-form submissions to a group to share & control access? If not, is there a way to control submissions access at the ...
user avatar
0 votes
0 answers
23 views

Custom multiline textarea element

I need to render some text out of a bunch of node objects so that they are listed like this in the textarea field: Item1 Price1: --- Price2: --- Item2 etc.. I created a custom element module for this, ...
user avatar
0 votes
0 answers
12 views

The clientside validation error message is shown on the top of the field

I'm on Drupal 9. I am using the Webform client-side validation (Select2 Jquery). Form validation error messages look good for all field types, except the select fields, where the validation error ...
user avatar
  • 113
0 votes
0 answers
11 views

How to delete webform submission without confirmation

I would like to delete webform submission by direct link, maybe in modal or something like this...without redirection to confirmation page. I use theme switching module to refirect to default theme ...
user avatar
  • 1
0 votes
0 answers
65 views

How to set current page on webform

I have a webform setting Wizard page like this I want to know how to set current page for webform. Example after user enter input for information page, when user click next button I'll store this ...
user avatar
  • 727
0 votes
1 answer
45 views

Programmatic webform redirect on submission not redirecting

I have a webform with the confirmation set to redirect to URL (redirects to a custom path or URL) In my webform handler, I have the following: public function confirmForm(array &$form, ...
user avatar
0 votes
0 answers
35 views

Creating twig field in custom composite

I need to have a twig field at the bottom of each of my entries in a custom composite showing a calculated price relating to a product, but I'm not certain on how to add a 'twig' field to the $...
user avatar
0 votes
1 answer
20 views

Correct approach to extend webform submission purge conditions?

I'd like to extend the behavior of WebformSubmissionStorage's purge method (e.g. to prevent locked submissions from being purged), and add the corresponding elements in the "basic" ...
user avatar
-1 votes
0 answers
28 views

hook_form_alter() and hook_webform_element_alter() aren't invoked

I have been trying to write a custom module for my webform where the access of a radio element (to approve or reject) is granted to the director's email (the submitted value of the email element in ...
user avatar
  • 1
0 votes
1 answer
22 views

Filter webform options from external source by field value

I have an options field which is sourced from an external json file using the following code. $nsbooks_url = 'https://mysite.com/myjson.json'; $preoptions = json_decode(file_get_contents($nsbooks_url),...
user avatar
  • 341
-1 votes
0 answers
48 views

Select a radio button with Javascript

I have a webform with a set of radio buttons (group). I need to conditionnaly select one of the radio buttons based on the value of another field. I thought I would use Javascript to achieve this task....
user avatar
1 vote
1 answer
22 views

Current user filter

I have a web form, and I want to filter records by current user from views module, when I select filter "submitted by" and use equal to [current-user:uid], I don't get any results, can ...
user avatar
  • 61
1 vote
0 answers
16 views

How to create custom composite entity select for Content?

Basically, I just need to show a custom composite containing a dropdown to the user which shows all the names of all published nodes of type 'product' so that they can choose as many as they want and ...
user avatar
0 votes
1 answer
25 views

Restrict access to webform submission nodes for anonymous

I have a webform in my drupal website. I am uploading a text and pdf file through it. Now I am displaying all the content in a list using a block which is accessible for everyone. It's working fine. ...
user avatar
0 votes
0 answers
35 views

How do you use 'basic markup' in a webform default value?

How can you use 'basic markup' in a webform default value? The goals is to format the default text. Steps Create a Basic HTML element Edit the element Using the 'advanced' tab set the default value. ...
user avatar
  • 1,359
0 votes
1 answer
28 views

How do I get the submitter of a webform submission?

I'm developing my first webform handler and I need to access the submitter of the webform submission in the postSave method. I know I can get the webform submission ID with $webform_submission->id()...
user avatar
  • 11
0 votes
1 answer
38 views

Web form Custom element

I created a custom webform element, It works perfectly, but when I add a table form element, It is not showing My Code : <?php namespace Drupal\webform_mapper\Plugin\WebformElement; use ...
user avatar
0 votes
0 answers
20 views

How to persist webform validation result in multistep ajax webform handler?

In my AJAX form the user has to do a validation as he needs a code to enter the rest of the form (it has 3 pages or more). I have an handler to validate this and this same handler uses that code to do ...
user avatar
0 votes
0 answers
33 views

Webform upload files issue

I have setup our site to allow files to be uploaded and attached to the submission of the webform. I have the private directory setup with the .htaccess file. That part seems to be ok because when I ...
user avatar
  • 1
2 votes
2 answers
177 views

Node ID caching on hook_form_alter()

I have a webform with an email field. I am embedding the webform on each node, with a field on the node for the email address. I implemented hook_form_alter() in my .theme file that loads the node ...
user avatar
0 votes
0 answers
18 views

Webform Conditions for a multi valued select

I'm making a quiz utilising Webform. I would like to use a multi-valued select list for one of the questions, and want to grade the user on any combination of correct answers selected. Using the ...
user avatar
  • 270
0 votes
1 answer
33 views

Webform Conditional based on previous webform entry

I have a webform that we have people fill out two times - for a pre-test and a post-test and I am looking for a way to determine if a pre-test has been taken an if so, set a specific value on form ...
user avatar
1 vote
1 answer
41 views

How to add an unique wrapper id to a widget element?

I made a widget that "generates" fields based on the option chosen of a select field. I got most of the logic done: 1- An option is chosen from this field: $element['value'] = [ '#type' =&...
user avatar
0 votes
0 answers
20 views

Is there a way I can forward specific Webform Submission Results (from admin) to an email address I enter?

I'm in the process of setting up a "system" where users can submit their Webforms with accompanying details/files and it gets logged into the Webform>Results>Submissions page. This ...
user avatar
0 votes
0 answers
39 views

Send email with PDF attachment to user that completes the webform

When someone submits a webform that has just two fields (Name and Email) I want the system to send them an email that thanks them for submitting the form and provides a PDF file. Webform enables ...
user avatar
0 votes
1 answer
33 views

Checkboxes in Webform Custom Composite Table

I've been testing Drupal 9 and Webform 6.2.0-beta2. After researching a few hours, my understanding is that the current Webform doesn't support checkboxes in custom composite fields tables. Is that ...
user avatar
  • 111
0 votes
0 answers
20 views

Perform and store a calculation from a common field in two different nodes

Summary I am collecting survey results - one for a pre-test and one for a post-test and I am looking for a way to automatically generate a calculation on a numerical field in two nodes (one pre-test, ...
user avatar
0 votes
1 answer
88 views

"Object of class Drupal\Core\Render\Markup could not be converted to number"

I am receiving an error on a webform I'm developing. Just to give some insight into the webform, the webform is taking in some data (customer type and monthly water consumption) and calculating the ...
user avatar
0 votes
0 answers
42 views

How do I programatically change a webform's element type?

I am using a webform element 'select_other' in the webform. We got a requirement that the Other field should only appear if certain conditions are satisfied. I already have a Webform Handler In place, ...
user avatar
0 votes
0 answers
42 views

Webform Confirmation settings on form submission not working

I am using Acquia site studio components for web pages. In all the pages I have a pop-up with a webform submit button to enter to the site. In Webform confirmation settings I have selected the option -...
user avatar
0 votes
0 answers
32 views

Create alternate "View Modes" for Webform Submissions?

In a View of type "Webform Submissions", I have added a field called "Webform submission: Rendered entity". This displays the entire webform submission (content from all fields in ...
user avatar
  • 1,234
0 votes
0 answers
20 views

I cannot load some pages after configuring CiviCRM Webform

I installed Drupal 9.3.5 and configured Webform 6.2. When I try to load the setting and other pages, I get this error. Symfony\Component\Routing\Exception\RouteNotFoundException: Route "webform....
user avatar
0 votes
0 answers
19 views

Webform rendered entity display

can someone give me a hint how to influence the "default" display behaviour of a webform submission rendered entity within a view ? i have a webform using multistep pages and details-...
user avatar
0 votes
0 answers
29 views

Select by drag and drop

I need to build a form for an event registration where people can select the workshops in order of their preference. In Drupal 7 I used to have a grid with radio buttons, but that does not seem ...
user avatar
  • 228
0 votes
0 answers
24 views

User with only "Edit own webform" permission cannot add elements to own webform

I have created a "form admin" role with three permissions only: "Access the webform overview page", "Create webforms", "Edit own webform" (Drupal 9.3.7, Webform ...
user avatar
0 votes
0 answers
24 views

how to get file id

I have this webform submission hook and i want to add a file to it when its submitted. I know how to alter the webform submission but now i have an issue that i want to load a file but i don't know ...
user avatar
0 votes
0 answers
42 views

Get a term name with twig_tweak drupal_field using a dynamic value

I'm using Webform in D9 and have a multipage form. In step 2 of the form, I need to show the taxonomy term that was selected in step 1. I've defined the field that will display it as a computed twig ...
user avatar
0 votes
0 answers
14 views

How to add multiple html tables in one view or page

I created, 4 tables with the datatables module, but I need to leave the 4 in a single page or view, I tried with dashboards and with draggable dashboards, but they only work on the administrator side ...
user avatar
  • 101
0 votes
0 answers
28 views

Append info to original filename when uploading file in webform (filename token)

I'm sure I am missing something really obvious. Drupal 7 + Webform + File (Field) paths. I am uploading files (jpg, pdf, xls) in a webform and need to append the node NID to the original filename. But ...
user avatar
  • 119
0 votes
1 answer
36 views

How to reset webform field validation state?

Not sure if I'm asking the question correctly. Here is the configuration: I have a form that contains conditionally hidden fields. The conditionally hidden webform fields are marked required. On the &...
user avatar
  • 935
0 votes
0 answers
20 views

Webform Submissions settings, "Convert anonymous user drafts and submissions to authenticated user" doesn't seem to work

In a webform I've built, under the Submission settings I have enabled, "Convert anonymous user drafts and submissions to authenticated user," and the help for it says, "If checked, ...
user avatar
  • 1
0 votes
0 answers
57 views

Drupal Webform REST

I am trying to use Drupal Webform REST. I got an error "The 'restful post webform_rest_submit' permission is required." on browser console. I have enabled modules and REST resources as ...
user avatar
  • 1
2 votes
0 answers
32 views

Problem with same webform added multiple time in a page

Problem I have an Article node with layout builder enabled for content author. I have webform Subscribe newsletter with ajax enabled. I add webform Subscribe newsletter to the node twice. So there are ...
user avatar
  • 254
0 votes
0 answers
25 views

How to get a link to an attachment field in a form

I have Webform filled by employees. Each user fills the form and submits it. Then a supervisor comes and uploads an attachment to each user's submitted form. How do you create a link that the ...
user avatar
  • 204
0 votes
0 answers
21 views

updating $webform_submission values in the alterForm function of a custom webform handler

I'm running into a situation that I hope someone will be able to offer some advice and guidance as to my approach is not working at the moment. We're building a webform which contains an email address ...
user avatar
0 votes
1 answer
24 views

How to create a new submission from a previous submission?

Currently, when I submit a new form, there is no problem (WebFormSubmission::create() and save()). When I reload this Webform submission and modify some fields of form and record it, there is no ...
user avatar

1
2 3 4 5
50