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
-2
votes
1answer
32 views

Best Solution For Creating and Maintaining Custom Records [closed]

I would like to configure my Drupal site as a utility so that the following can be done: Input/create records for contacts or clients Be able to select these records for updates and add new data via ...
0
votes
0answers
10 views

adding name and id to labels of the webfrom?

How to add the name and id to the labels of the webform . By default it does not add any name and id to labels.
0
votes
0answers
8 views

Is it possible to get Webform composer.libraries.json requires without using wikimedia/composer-merge-plugin?

Is it possible to get Webform composer.libraries.json requires without using wikimedia/composer-merge-plugin? See an issue in drupal.org mentioning that we shouldn't use merge-plugin. https://www....
0
votes
0answers
9 views

Getting warning message due to Select/Other field

Any time we upgrade to Webforms 8.x-5.11 the follow warning displays on one of my forms. I've narrowed it down to a Select/Other field. I can't remove this field as I loose all past data and even then ...
0
votes
0answers
20 views

Trigger recalculation while calling fields in loop in Webform computed twig field

I'm trying to trigger Ajax calculations inside a loop in a computed twig field. When trying to call my fields in a loop, it does not trigger the recalculation, so the form is not updated during user ...
0
votes
0answers
6 views

Remove 'Submission Information' from a webform result view

I am trying to remove the Submission Information section from my webform results page. The theme I am using has this section automatically expanded with no way to collapse it to make it at least less ...
0
votes
1answer
26 views

Permission to create webform submissions only for the author of the node

I'm using webform 8.x for a personal project and I'd like to know if it possible to enable only the author of the node to submit the form. In my project each node is an aquarium, and I am using ...
0
votes
1answer
27 views

How can we show the difference between values in consecutive rows in views

I am building a site where users will fill webforms (these are quality of life questionnaires). Users will fill the same form several times. I want to show the change in the value of fields in the ...
0
votes
1answer
12 views

Show external mysql database data in webform field

External database. - I want to allow drupal webform users to choose data from an external mysql database table. They would have the option to choose a region and an associated locality when completing ...
0
votes
0answers
16 views

Empty fields are shown in the preview page

I'm using Drupal 7.67 and Webform 4.22 with Add more 2-x.dev and CiviCRM 5.19.3. On my webform, I'm using the add more option to offer the possibility to register more contacts. By the preview page, ...
0
votes
0answers
25 views

How to reference on Computed Twig in another Computed Twig

I am creating a webform that collects data on the number of private offices that a company wants in their workspace and then does calculations based on those quantities. I can easily do the basic ...
0
votes
2answers
47 views

How to access webform field labels in a twig template?

The YAML below represents a webform. Theming is simple using the twig template also found below, but the label for email is inline with the input field by default. How can the labels in the webform be ...
1
vote
0answers
35 views

How to render webform element in twig file template for HTML display

I want to override the HTML display for webform submissions. So, I have copy this file "webform-submission.html.twig" in my template folder and rename it in: "webform-submission--testform--html.html....
0
votes
1answer
31 views

Programmatically set the value of a multi-value field from multiple arrays

I have 3 taxonomy vocabularies: Fruits Vegetables Drinks On the Article content type, I have set a multi-value entity reference field field_article_all_items referencing all of Fruits, Vegetables ...
0
votes
1answer
15 views

Webform new line after the field name

I have created my first webform in drupal 8. However, I found that some of the fields such as "Telephone", "Email" are showing the field name and the textfield on the same line. However, for the text ...
0
votes
0answers
47 views

How to check the Webform submission values in a twig template

I have an Webform with an option element, (option_one), with 6 options. Below this are 2 option elements with 5 and 2 options. These 2 option elements have a conditional statement to display if the ...
0
votes
1answer
20 views

Confirmation message not getting rendered when printing the elements seprately in twig and ajax is enabled

Iam using the following twig code in webform-submission-form--newsletter-signup.html.twig <div class="col-12 col-sm-12 col-md-6"> {{ form....
-1
votes
0answers
31 views

Using submitted data from one webform in another webform

I want to create 2 forms and one for administrator and one for users. For example administrator webform has some fields and options a, b ,c, d, e administrator selects 3 options, enters the data and ...
0
votes
0answers
11 views

Requesting clarification on expected behavior of webform submission autofill

I have a user who wants to have repeat form-submitters' last form data pre-populate the form fields on future submissions. I haven't used this feature before and I'm trying to clarify if the autofill ...
0
votes
0answers
41 views

Programmatically get the current url of the page from where a Webform in a dialog has been loaded

The below link will open the webform (contact) in a dialog: <a href="/form/contact" class="btn btn-success webform-dialog webform-dialog-normal">Contact</a> this same link has been ...
0
votes
1answer
36 views

Loop through a multi value entity reference field working only on the first selected item

1) I have an entity reference view articles_per_user listing all nodes of type article authored by the current logged in user. 2) On the Article Entity, there is a taxonomy reference field ...
1
vote
1answer
68 views

Programmatically set the value of a date/Time field

I am trying to copy the value of a Date/Time Webform element to a Date/Time field set on the article node. Below is the source code of the Date/Time Webform element: expiry_date: '#type': datetime ...
0
votes
0answers
26 views

Image is “broken” with Custom Email Twig Template sending with Webform

The setup consists of Drupal 8 + Webform (ver. 5.6 - https://www.drupal.org/project/webform/releases/8.x-5.6) + CKEditor Image Upload (https://www.drupal.org/project/ckeditor_uploadimage). This allows ...
0
votes
0answers
41 views

How do I correctly load a webform using Ajax?

The page I need to make is a bit complex and my team and I face many problems with it. We need to have a page with multiples sections (just square blocs with text on it). Each section displays (on ...
0
votes
0answers
11 views

How do i get the “form id” given the “node id” of a webform 3 form?

I would like to extract form structural data from a form when all I have is the node id. What I would like to do is get the "form id" from the "node id" so I can access the form data using ...
0
votes
0answers
15 views

How can I query the full component layout of a form?

I need to create a webform preview page for a client's website that uses many multipage webforms. The idea is to allow a preview so website users can prepare for the requirements of the form before ...
0
votes
0answers
14 views

Email body ignores HTML markup

Am using webforms and under the email handler, I have the following as email body: <p>Submitted on [webform_submission:created]</p> <p>Submitted values are:</p> <br /> &...
0
votes
0answers
20 views

Include multiple profiles per user in webform data

I have a profile type that allows multiple profiles per user. Users have different numbers of profiles. I'm trying to include this variable profile data in webform submissions tied to the profile(s)-...
0
votes
1answer
39 views

How to iterate thru a webform checkbox results

How do you iterate thru a webform checkbox array like so : Checkboxes_name : ☒ option 1 ☒ option 2 [webform_submission:values:checkboxes_name_:value] print : option 1, option 2 I would like to ...
0
votes
1answer
29 views

Remove disabled attribute/state during submission

I would like to find a way to remove the disabled attribute from webform fields inside a custom Handler. The disabled attribute is currently being applied to webform elements during user input via ...
-3
votes
1answer
93 views

How do I attach a webform to another webform's submission?

I found a demo for the Webform module which includes 2 forms: application and application evaluation. Once the application form is submitted, the application evaluation is attached at the bottom of ...
0
votes
1answer
46 views

How do I find out which what fields are available?

I'm looking to access the values of the fields in postSave(). public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) { //what's in $webform_submission? can I use ...
0
votes
0answers
15 views

View with ajax enabled and webform as entity when there are no results is not sending webform

I have view with: Block: Map (Google Maps with dealers) Attachment (list of dealers below map) (inherit contextual filters: yes, inherit exposed filters: yes) Exposed filter visible for visitors (...
0
votes
0answers
16 views

Add extra values to “next submission value”

Each time a webform is submitted it create a submission value i.e. 30 and when this is passed to the notification email it looks like: http://localhost/sitename/admin/structure/webform/manage/...
0
votes
0answers
21 views

Webform submission count by user

Our website offers live streaming videos for instructional purposes. We are asking users to submit a form after they watch the video, sort of as a "Check-in." After 10 "Check-ins," the user gets a ...
0
votes
2answers
26 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
1answer
14 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) ...
0
votes
0answers
20 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
1answer
48 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
2answers
33 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
29 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
35 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
47 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
46 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 ...
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 ...
0
votes
1answer
31 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
42 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
29 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
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; ...

1
2 3 4 5
45