Answer the question
In order to leave comments, you need to log in
How to create contact forms on phalcon(component)?
Recently, the question was asked why they don’t choose phalcon, now I understand why. I look at the documentation and understand that I don’t understand anything in it, I mastered this material with yii2 in a week.
The only more complete course on phalcon on youtube that I had in unbearable Chinese)
Trying to make a feedback form that I can connect to different views, such as component, widget or snippet (everywhere is called differently).
//volt
{{ form('send', 'method': 'post', 'role': 'form') }}
{{ text_field("name", "placeholder": "Ваше Имя", "class":"forms__inp") }}
{{ tel_field("tel", "placeholder": "Телефон", "class":"forms__inp tell") }}
{{ submit_button('Отправить', "class":"btn btn-red forms__inp") }}
{{ end_form() }}
/component/
../views/formWidget.php
../formWidget.php
//вывел
<?= ContactWidget::widget([]) ?>
Answer the question
In order to leave comments, you need to log in
I still can't understand what is your problem?
You can separate your piece of code into a separate view, and then just do
{% Include('shared/form_view') %}
//или
{{ partial('shared/form_view') }}
{{ partial('shared/form_view', ['show_submit':true]) }}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question