Answer the question
In order to leave comments, you need to log in
How to organize a dynamic form on the site?
It is required to create a form that will have to connect to different materials and be tied to its own material. However, the form is the same.
Is this possible with the same webform? Now I'm getting acquainted with this module and I see that it creates a specific page with a form. With which it is not yet clear what to do ...
And I have the following structure: On the site is a description of the events. Each event has a set of pages linked to each other by url. For example, general information about the event1: /mer/1
The rest of the pages related to this event (for example, the program of the event, diary, results, etc.) have the following pages mer/1/5, mer/1/6, mer/1/ 7 etc.
This structure allows you to display in the menu of this event all the pages related to it.
Now we need each event to have a registration form for participants. The form is the same, but it needs to be tied to this event in the same way as everything else.
The user clicks on the "registration" menu item and finds himself on the form page with the address mer/1/form Fills it out, sends it. The administrator receives a form with a hidden field of 1 - and understands that people register for the event1.
Moreover, it is also necessary that in each individual case it was possible to open the form or close it. That is, somewhere check the box "open registration" or vice versa "close". If open, show the form. Closed - show the phrase "closed". And these settings are individual for each event.
Something I doubt that this is possible with a webform.
Maybe someone will advise something?
Answer the question
In order to leave comments, you need to log in
entity form
open-close: you need to do javascript, you need to write a button in node.tpl.php or simply add the html code of the button through JS, by clicking on the button it makes the fields of the Entity Form visible.
Another Entity Form can be grouped in one div-block using the field_group module
Add the "Event" field of the text type to the web form, set the default value to [current-page:url] or [current-page:title] (as it is more convenient), display the form in a block.
Instead of a text field, you can add a reference field - https://www.drupal.org/project/webform_references
But then you have to change the form and substitute nid from the url.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question