New answers tagged

2

I was able to solve it like that, I hope it helps you


2

you can use Computed twig field. In this example it calculates the result of 5 fields (a2 + b2 + c2 + d2 + f2) only if all the fields are complete


1

my English is not very good but you can follow these steps to solve your problem. 1 -add email, 2 -select custom body and the values you want to include, 3 -exclude empty values and boxes that are not checked, you can personalize even better by writing your text and adding the value you want. for example: "yourText": [webform_submission:values:...


1

After trying several solutions, I found that the best way is an easy forgotten one. i used webform-confirmation--[webform_id].html.twig in the theme. you can use java script directly, same as provided by source (like google charts), just replace Webform variable like this: {% set H_Axis = webform_submission.data.H_Axis %}


0

Alright, a colleague saved me again: The access checks can be dissabled individually per view via Query settings > Disable SQL rewriting For this particular view and usecase this is exactly what is needed, as it is only callable by backend processes.


0

You need install twig_tweak and use token like {{ drupal_token('site:name') }}


1

The module maintainer says it's by design: https://www.drupal.org/project/webform/issues/3231110


0

this sounds like a case for hook_webform_submission_presave. You can also see the available hooks here: http://api.drupalhelp.net/api/webform/webform_hooks.php/group/webform_hooks/6.3 You'll need to add the hook implementation to your theme or module file.


0

You also can use a text field element rather than an Select element , and then in hook_form_alter change the element type to select and apply your desired options to that, in this case webform won't ignore input value as there is no restriction for textfield (if no regex or ... is set)


1

You need to target the composite address element's sub-elements. http://safebuy.nz/New?your_address[address]=28%20smith%20Rd&your_address[address2]=&city=&your_address[state_province]=Northland&your_address[postal_code]=&phone_number=0220492570


0

I solved this issue by populating all possible options through hook_webform_selection_options() and then resetting the options in hook_form_alter() to remove the ones I don't need for that instance.


0

You can prevent duplicate submissions for all webforms in /admin/structure/webform/config It prevents someone from clicking submit twice and posting the exact same data. If a user clicks submit and then back and submit again, you will get duplicate submissions. If the user clicks submit twice (very fast) you will not get a duplicate submission.


1

you can always use drupal_get_form function to retrieve a form in drupal. this function allows you to send any needed arguments for example you can call it like this: $form = drupal_get_form('SOME_FORM_ID', $argument1); in this case $argument1 value is passed and can be accessed in hook_form_SOME_FORM_ID_alter as follow: if(isset($form_state['build_info']['...


Top 50 recent answers are included