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
0 answers
23 views

Custom CSS/JS combined to webform custom component gives type MIME error

I've made a custom Webform component, working well so far. A javascript library is attached to this component. $elements['#attached']['library'][] = 'my_module/my_lib'; My client tried to add custom ...
mt.i.1's user avatar
  • 53
0 votes
0 answers
10 views

Display predefined set of qestions in webform

I have requirement where customer wants to create a pool of questions/elements in webform and then create few sets of questions. Then randomly select one set of questions and display to user. I couldn'...
Sharique's user avatar
  • 201
-2 votes
0 answers
31 views

How do I upgrade webform forms? [closed]

Is there any approach to upgrade a Drupal 7 site dedicated to forms?
Matoeil's user avatar
  • 3,355
0 votes
1 answer
15 views

How can I export all webform structures?

How can I export forms generated from a Drupal 7 site using webform? The data is meant to be used to recreate a form generator tool by another team (who is not necessarily using Drupal).
Matoeil's user avatar
  • 3,355
0 votes
0 answers
43 views

Conditional dropdown select menu

I'm using the Webforms module for Drupal 10 and I am trying to create a form with 2 select boxes related to 2 content types: Content type: "Country" Content type: "City" I'd like ...
BMM's user avatar
  • 103
-3 votes
0 answers
28 views

How to update/convert stored field value in webform database from am to pm in Drupal 10

I have a field in database with datatype as integer, in my custom module I had to convert the date to readable format in d/m/y, the value is inserted to a custom table field using strtotime(date('d/m/...
Jake13's user avatar
  • 43
-2 votes
0 answers
42 views

Select options and views with or without "Webform" module

Is there any known way to bind the select options of a webform to the output of a view? I'm thinking of a webform implemented with the Webform module, though I may consider other solutions. I searched ...
AppLEaDaY's user avatar
0 votes
1 answer
12 views

What permission controls access to "webform_html_editor" input type?

I'm a Drupal site owner, and my admins cannot access any webform_html_editor elements. The administrators have full access to all wysiwyg inputs, but there is no permission obvious to me that controls ...
aaronbauman's user avatar
0 votes
0 answers
25 views

Change View webform link edit to edit/all

I am currently using drupal 10 and I created a page using View (acquiring webform with pages). In View I add link edit webform. When I click edit, it can open the submission as expected. However since ...
Waluyo Adi Siswanto's user avatar
0 votes
0 answers
46 views

setElementData() on link element

How do I call setElementData() on a link element? The following code doesn't work. $submission->setElementData('link_element', ['title' => 'string', 'url' => 'string']); I get this error ...
esod's user avatar
  • 309
0 votes
1 answer
17 views

How to configure a multistep webform with custom alias to use GET instead of POST

I have a multi step webform, which I'm using as a kind of configurator. I want to allow people to share the link, so they can land on the last page of teh form with all the other values already set. I ...
Andreas's user avatar
  • 372
-1 votes
0 answers
25 views

Change the user that submits the form

I have to give the user access to modify the "Submitted by:" and the module does not allow me to do so, so that the administrator user of this form can change the sending user
luis baron's user avatar
0 votes
0 answers
49 views

How do I get form elements with multiple values to display only one/single field with the add more button?

I expect what I'm asking is supposed to be the default behavior of form elements where users can input multiple values, however when I have a form element that has 3 or more allowed input values, a ...
flamesquirrel's user avatar
0 votes
0 answers
17 views

Submission of programatically added fields in webforms

I have an ever-increasing set of hidden fields that should be added to every form in my site. I created helper update-hook functions to add new fields to the form, but now forms have too many fields ...
lfccarvalho's user avatar
0 votes
1 answer
50 views

How can I programmatically stop webform from sending an email?

I need to stop sending my webform submission email programmatically and conditionally. By conditionally I mean I have two contact forms and two locales on my Drupal application. I have a custom ...
irohit786's user avatar
0 votes
0 answers
27 views

How can I upload file in a webform field through an API using Postman?

I created a webform with a File element called attach_resume_cv inside it. I want to create an API for uploading the files in that webform. In my_module.routing.yml file I created next route: ...
Iulian Boiculese's user avatar
1 vote
1 answer
67 views

How to get the Drupal webform submission changed value?

I'm trying to get the webform submission changed data when a form submission is updated in date format to be captured into a custom field. I'm able to get the webform completed value in a custom ...
Jake13's user avatar
  • 43
0 votes
0 answers
15 views

Webforms setElementData on checkboxes

Here's a form with two elements: A checkbox field and a checkboxes field. langcode: en status: open dependencies: module: - my_module weight: 0 open: null close: null uid: 1 template: false ...
esod's user avatar
  • 309
0 votes
1 answer
49 views

How to send file from React to Webform via Rest

I want to send an attached file in a React form to Drupal Webform via REST , but don't know how. I am sending the other fields successffully. They appear in the List with submissions. Here is my code: ...
Anatoli Asenov's user avatar
1 vote
0 answers
25 views

Webform default value fallback

Is it possible to have a fallback value when using tokens in a webform? I mean if a token cannot get evaluated, then the fallback value will be taken. For example I get a default value from URL. If ...
Ervin Nagy's user avatar
0 votes
0 answers
30 views

Display other user's webform submissions

So, I'm currently programming a module and one of the functions should be that certain users that belong to a specific user group (e. g., 'Counselor') have access to their clients' webform submissions ...
Quetzcodecoatl's user avatar
0 votes
0 answers
21 views

Is it possible to batch send email submissions from a Webform?

I'm using a webform to send emails to around 100 people at a time, by sending a submission to all authenticated users. The Drupal side of things handles this fine. However, the email service I'm using ...
xpress's user avatar
  • 1
0 votes
0 answers
13 views

Custom webform element does not pass custom properties to $element array

I made custom @WebformElement , all good, expect new custom property check_if_work which I defined in defineDefaultProperties() and $form['validation']['check_if_work'] of form() is not present in ...
Mykola Mykolayovich Dolynskyi's user avatar
0 votes
0 answers
37 views

Webform Composites, Variants and Computed Twig Elements

The webform uses webform composites using the webform_composite module and a variant to show different fields on different reference nodes. Here's the form: uuid: 70a21716-dfec-471a-a6e5-f70046bb8783 ...
esod's user avatar
  • 309
0 votes
0 answers
18 views

Cross-Validation?

My team is working on a registration form using the webform module. One issue we are having is cross-validation. We have a field for a parent or educator to enter in their username, after this they ...
Shayla's user avatar
  • 1
0 votes
0 answers
52 views

How to get a webform submission by uuid in a custom controller before submit?

Before we submit our multi step webform, we do a ajax call to a custom controller. Ideally this controller would set some of submission values "under the hood". What we try to achieve is to &...
Andreas's user avatar
  • 372
0 votes
1 answer
37 views

How to form_alter a specific webform ajax page based on values of the page before?

We are building a registration form with multiple pages (in ajax mode), on the first page, we select the number of participants and on the next page we are displaying a custom composite form to ...
Andreas's user avatar
  • 372
1 vote
0 answers
12 views

How to send webform's full URL to Salesforce

We are creating Leads in Salesforce from Webforms submissions and now we want to include the full URL in a Salesforce field. I have tried Submission URI field but it does not include the host nor the ...
Khin's user avatar
  • 11
0 votes
1 answer
27 views

Webform: Remove automatically generated empty composite item in results edit

When I enable, submit, and edit results in the webform example composite module, an extra item is automatically generated. I'd like to keep "Add 1 more items", but remove the automatically ...
esod's user avatar
  • 309
0 votes
1 answer
32 views

Custom webform Element not rendered

It looks like this is a frequent question, but I still can not figure out, why my custom webform element is not showing up. (I read already this post and also the example module) web/modules/custom/...
Andreas's user avatar
  • 372
0 votes
1 answer
31 views

Webform get email addresses from entity select unlimited

I have an Entity select element that references a role. The element is unlimited so multiple users can be selected at one time. I need to get each selected user's email address. Using a computed twig ...
esod's user avatar
  • 309
2 votes
0 answers
27 views

Display images in a Webform options (that displays a likert scale)

I'm looking for a way to display images in Webform options that I have created. The Webform options display a Likert scale with 4 options. The machine name of the Webform option is '...
Maki Delidaki's user avatar
0 votes
0 answers
28 views

Is there a way for a Webform submission to include a value returned from an Ajax callback prior to the form being submitted?

I have a custom composite webform element that is made up of a textfield, a button, and a markup element to show a response. The user enters a value in the textbox, clicks the button, and an Ajax ...
Problue Solutions's user avatar
1 vote
0 answers
27 views

Send email "After a webform has been submitted" to submitter

I'm using Drupal 7.97 with these modules: Views 4.25 Rules 2.13 Webform rules 1.6 Recently I upgraded Drupal to 7.97 and Views to 4.x branch, After that my rule that sends email to anyone who ...
Alex Sh's user avatar
  • 11
0 votes
0 answers
38 views

Webform composite sub-element altering : how to do?

👋 I'm currently developing a Webform based module (D9). One functionality I'm working on is around form "interdependency" : for a given form, some fields can be pre-filled from another ...
rroblik's user avatar
  • 49
1 vote
0 answers
50 views

Why does this code not load webform submissions?

I’m trying to load all submissions from a specific webform, and for some reason it always returns no results (even though I know it has results from the UI). I found this bit of code that I adapted ...
Rene's user avatar
  • 101
0 votes
0 answers
32 views

Webform Option Limit: How to write a module to change the number to subtract from the limit?

I've used the option limit handler before without problems, but now I have a new scenario. I have a limit of 200 seats and each user can reserve up to a maximum of 5 seats. The user chooses the number ...
Prof's user avatar
  • 59
-2 votes
1 answer
42 views

How can I avoid forms are saved as drafts? [closed]

I used Drupal 9 webform module to create forms , Each form has Submit button and Save as draft button, Below is the configuration for the form , When I submit the form it save as draft , But when I ...
ImagoTechStack's user avatar
0 votes
1 answer
97 views

Loading webform in modal is too slow

I have webform with near 130 fields (text, entity checkboxes, radios, composite, etc) Use it in modal: <a href="/my-form?title={{node.id}}" class="webform-dialog" data-dialog-...
kazah's user avatar
  • 29
0 votes
0 answers
46 views

Why isn't this working?

I'm trying to take the data from a webform submission and create 2 nodes. I've looked at various examples, but I cannot figure out why this isn't working. Can anyone help? Thanks in advance. My file ...
gmak's user avatar
  • 59
1 vote
1 answer
105 views

Override contrib module's template for an admin module

I need to override a contrib module's template for an admin module. For example, the webform_composite module has hook_theme() in its module file. /** * Implements hook_theme(). */ function ...
esod's user avatar
  • 309
1 vote
0 answers
33 views

Can the Webform Table Element row span 2 cells

I created a webform and added a table element as per the information from Webform Composites vs. Tables | Jacob Rockowitz My table has 4 columns & 14 rows. The bottom 3 rows will only have 3 cells....
David Barrett's user avatar
0 votes
1 answer
112 views

How to set a webform default value for anonymous user?

I have been using hook form alter for a webform, to set a default value for a webform added as a block to a page. Below is the code, the code only works for users who have logged, but for anonymous or ...
Jake13's user avatar
  • 43
0 votes
1 answer
49 views

Webform Create node, send email when webform is submitted

I'm creating a node when a webform is submitted and adding the webform submission id to an int field on the node so the node is linked to the webform submission. I'm also sending an email when the ...
esod's user avatar
  • 309
0 votes
0 answers
14 views

How to filter webform nodes with a contextual filter that restricts webforms to those which have not been answered

I have a webform node display page that shows webform nodes that are available to individual users. Individual user accounts have a field called Project which has a Project name. This allows users to ...
Santam's user avatar
  • 15
0 votes
0 answers
44 views

How do I display only the "View" tab for a specific webform and role?

I have multiple webforms, In each of these webform submission results page I require only view page, when a non admin user uses the site to see the results, they should only see the view tab and the ...
Jake13's user avatar
  • 43
0 votes
1 answer
51 views

webform contact form gives access denied for anonymous users

I have a few webforms on my D9 site. They all work for anonymous site visitors except for the contact form, which gives an "access denied" error. The permissions under the form's Settings-&...
leeksoup's user avatar
0 votes
0 answers
28 views

How can I get conditional logic working when embedding a webform?

When embedding a multi-page webform within a render array using #type => 'webform', it seems like there's a bug where the conditional logic of webform elements does not work. Note: The webform's ...
user1414202's user avatar
0 votes
1 answer
106 views

Why can’t I print Webform submission values in an Twig-templated HTML mail?

This is further to https://www.drupal.org/project/webform/issues/2946976. I'm trying to use a Twig template for the HTML email that is sent upon webform submission; I'm using Symfony Mailer for the ...
Glenn's user avatar
  • 21
1 vote
1 answer
29 views

Define key for html email

I'm using Symfony Mailer to send HTML emails in my site. This requires 'module' and 'key' to find my email twig template file. How do I find or define 'key' for my email handler in my Webform settings?...
Glenn's user avatar
  • 21

1
2 3 4 5
52