H
H
Hitcher24922020-12-27 20:43:51
Netcat CMS
Hitcher2492, 2020-12-27 20:43:51

CMS Netcat How to make an order form appear when you click on a button?

Hello everyone.
Not only am I new to this cms, but I've never used them at all. I made a catalog, created a component - a product and a component - an order (form). So - you need to click on the "Order" button on the product card so that the order form with the fields appears, when you fill in all the fields, click the "Send" button and the data from the fields fly to the mailbox.

Please help, I couldn't find any information about this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2021-01-12
@Eridani

-Create a section
-Attach the infoblock of the order component to it
-In the infoblock settings, set the default action - "adding" and the "access" spoiler, set the permission to add to all categories of users, so the CMS will not swear if you try to add an object (create a new order) unauthorized user.
-In the prefix of the list of objects in the form component, write

<?= $f_AdminCommon; ?>
<?= $addForm;?>

-In the action template for adding an object, write or generate a form with the fields that you created for the form
-In the conditions for adding an object, validate as you like
-In the action after adding an object, write the standard functionality for sending a letter, whether through the mail function or via PhpMailer or smtp, as you like.
And when you click the order button, you need to write JS that will send an ajax request to the URL of the section to which you attached the form infoblock and pick up this form, eventually inserting it into a modal window or somewhere else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question