New answers tagged

0

I've been working with something that's similar enough that it might help. I'm using the FillPDF module to fill out an editable PDF and send it by email, all through rules. Different results, but I believe the roadblock you've run into is the same one I had to work with. Let's say you want to send an email if the admin selected 'Send Email' from a submission ...


0

I'd do this with two content types, rather than webform: Available slot-dates Sign-ups You create the content for the available slot-dates (one node per date-slot), parents create the sign-up content. The Sign-up content includes the basic information that you need for kid's background context. After, you can add a paragraph to this content type that ...


1

UPDATE I went and followed Clive's suggestions. Since Node A and Node B use the same content type, I added in a relationship on the entity field where Node A references Node B. Then I added in a contextual filter on the content type form field (which is used in Node B), making sure the filter uses the relationship defined under Relationship. Finally I had ...


1

To Avoid spam keywords on Webforms with field. just check this out, https://www.drupal.org/project/webform_spam_words Administrators can provide the ability to add spam keywords, Error message, Webform field name.


3

When adding a webform component, look in the Containers section and add a "Details" container to your form. This should give you an accordion-like behavior using HTML5 details/summary elements.


0

Webform now has the way of creating Custom Composite elements from the UI that can be marked as unlimited. There are also various settings about layout, add more buttons, etc... It's been worked on under this ticket: https://www.drupal.org/project/webform/issues/2916573


0

I got the answer from Reddit, for Drupal 8 webform you can create a conditional for the email handler and use a regex expression to check that the submission field (body) contains only English characters. The expression I used to enable the submission is: ^[\s\x20-\xff\x{2000}-\x{206f}]*$


1

Drupal allows you to alter a form using the hook_form_alter() hook. I work primarily in D7, but it looks like the same approach I'd take in 7 would work in 8/9. You want to create a custom module and use hook_form_alter() to alter the validation part of the form. You want to check that whatever field you want to test against doesn't contain the characters ...


0

Better to create a service so you can use it anywhere: <?php namespace Drupal\my_module\Services; use Drupal\Core\Archiver\ArchiverManager; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Database\Query\SelectInterface; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; use Drupal\...


0

As far as I know, Webform doesn't have any special feature for adding CSS. The normal way to add CSS in Drupal is to create a subtheme of your site's theme and then add a custom stylesheet there. This is a bit complicated to set up but is the recommended approach for long-term maintainability. However, if you just want to define one or two css classes to ...


0

In Webform 6, this function already exists. In the Result submission page of each webform, there is a Customize button that allows to customize the submissions table, and un-select the fields you don't want to export.


1

Under 'Download options' you can limit the CSV to a submission id.


1

This piece of code helped to solve the issue. Clearing the cache for every submission of a webform which is protected by honeypot. function MODULE_NAME_form_alter(&$form, FormStateInterface $form_state, $form_id) { $advanced_validation = \Drupal::config('honeypot.settings')->get('advanced_validation'); if ($advanced_validation) { ...


1

Only now did I realize there is not only a submitForm method but also a presave method. I therefore changed my code as follows which is woking fine for me: class CustomHandler extends WebformHandlerBase { use StringTranslationTrait; /** * {@inheritdoc} */ public function preSave(WebformSubmissionInterface $webform_submission) { $this->...


Top 50 recent answers are included