S
S
Sergey2016-02-22 12:19:49
MODX
Sergey, 2016-02-22 12:19:49

How to arrange form submission with different content on modx?

The page has html layout and three blocks with tariffs, each tariff has an Order button. How to make modx revo so that when you click on the Order button, a form pops up (well, that's understandable, through the fancibox) and the name of the tariff is substituted into this form as well?
You can accumulate three forms, but it's stupid. How to do exactly with one form?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-02-25
@Derzaiii

I described the solution of a similar problem in the next question, I will describe it again specifically for this case.
1) add parameters to the call of each modal window (instead of 55 - resource ID with a feedback form -

...href="?par=Тариф_1"....
...href="?par=Тариф_2"....
...href="?par=Тариф_3"....

2) Create a snippet to pull these parameters from the address bar
Название - par

Содержимое -<?php echo isset($_GET['par']) ? $_GET['par'] : '' ;

3) In the feedback form that is called by the link, add a hidden field in which our value will be substituted:
4) And the last - in the chunk responsible for the outgoing letter to the mail we insert:
Тариф -

S
Sanes, 2016-02-22
@Sanes

JS tools

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question