M
M
maiskiykot2018-12-03 02:30:32
Drupal
maiskiykot, 2018-12-03 02:30:32

How to include data-json in Drupal 7 Webform form?

I transplant the form with json and js into Drupal 7. Almost everything works out except for editing the tag itself <form>. The fact is that the creator of the form included the data-json field in it, which pulls up certain data for calculation. In addition, there is an id that is tied to the JS library. How, without resorting to hooks (because there are several forms and different content), to dynamically attach JS and JSON to the Webform form? The customer is already trampling with his feet - he wants the result, and I'm in a stupor.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
afi13, 2018-12-03
@afi13

In general, the question is not entirely clear, but what prevents you from adding logic for all forms in one hook_form_alter() hook?
Working with Drupal 7 and not using hooks is a very strange decision.
https://api.drupal.org/api/drupal/modules%21system...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question