For what purpose does PG Theme Converter add name attribute for submit button?

Hello.

Webflow service generated the following form code for my project:

                <div class="request-section__flex-container">
                    <h2 class="request-section__title">Отправьте заявку, и мы поможем с выбором специалиста и временем консультации</h2>
                    <div class="form-wrapper">
                        <div class="form-block w-form">
                            <form id="email-form" name="email-form" data-name="Email Form" class="form">
                                <input type="text" class="text-field-3 w-input" maxlength="256" name="name" data-name="Name" placeholder="Ваше имя и фамилия" id="name" required="">
                                <input type="email" class="text-field w-input" maxlength="256" name="email" data-name="Email" placeholder="Email" id="email" required="">
                                <input type="tel" class="text-field-2 w-input" maxlength="256" name="Phone" data-name="Phone" placeholder="Контактный телефон" id="Phone" required="">
                                <textarea data-name="brief-description" maxlength="5000" id="brief-description" name="brief-description" placeholder="Кратко опишите проблему" class="textarea w-input"></textarea>
                                <input type="submit" value="Отправить" data-wait="Выполняется отправка..." class="submit-button w-button">
                            </form>
                            <div class="success-message w-form-done">
                                <div class="text-block">Спасибо! Ваша заявка принята! 
                                    <br>В ближайшее время с вами свяжется наш специалист для уточнения деталей
                                </div>
                            </div>
                            <div class="error-message w-form-fail">
                                <div class="text-block-2">Упс! Во время отправки формы произошла ошибка</div>
                            </div>
                        </div>
                    </div>
                </div>

After adding From Smart Action to this form, Pinegrow Theme Converter generated the following code:

                <div class="form-block w-form" id="contact_form_mailer_id">
                    <?php $mailer = new PG_Simple_Form_Mailer(); ?>
                    <?php $mailer->process( array(
                            'form_id' => 'contact_form_mailer_id',
                            'save_to_post_type' => true,
                            'post_type' => 'application',
                            'title' => 'Заявка с формы',
                            'intro' => 'Получена новая заявка с формы обратной связи сайта cbt-centre.kz:'
                    ) ); ?>
                    <?php if( !$mailer->processed || $mailer->error) : ?>
                        <form id="email-form" name="email-form" data-name="Email Form" class="form" action="<?php echo '#contact_form_mailer_id'; ?>" method="post" onsubmit="event.stopImmediatePropagation();event.stopPropagation();">
                            <input type="text" class="text-field-3 w-input" maxlength="256" name="name_field" data-name="Name" placeholder="Ваше имя и фамилия" id="name" required="" value="<?php echo ( isset( $_POST['name_field'] ) ? $_POST['name_field'] : '' ); ?>">
                            <input type="email" class="text-field w-input" maxlength="256" name="email" data-name="Email" placeholder="Email" id="email" required="" value="<?php echo ( isset( $_POST['email'] ) ? $_POST['email'] : '' ); ?>">
                            <input type="tel" class="text-field-2 w-input" maxlength="256" name="Phone" data-name="Phone" placeholder="Контактный телефон" id="Phone" required="" value="<?php echo ( isset( $_POST['Phone'] ) ? $_POST['Phone'] : '' ); ?>">
                            <textarea data-name="brief-description" maxlength="5000" id="brief-description" name="brief-description" placeholder="Кратко опишите проблему" class="textarea w-input"><?php echo ( isset( $_POST['brief-description'] ) ? $_POST['brief-description'] : '' ); ?></textarea>
                            <input type="submit" value="Отправить" data-wait="Выполняется отправка..." class="submit-button w-button" name="contact_form_mailer_id_5">
                            <input type="hidden" name="contact_form_mailer_id" value="1"/>
                        </form>
                    <?php endif; ?>
                    <?php if( $mailer->processed ) : ?>
                        <?php if( $mailer->error ) : ?>
                            <div class="error-message w-form-fail" pgwp-needed style="display:block;">
                                <div class="text-block-2">Упс! Во время отправки формы произошла ошибка</div>
                            </div>
                        <?php else : ?>
                            <div class="success-message w-form-done" pgwp-needed style="display:block;">
                                <div class="text-block">Спасибо! Ваша заявка принята! 
                                    <br>В ближайшее время с вами свяжется наш специалист для уточнения деталей
                                </div>
                            </div>
                        <?php endif; ?>
                    <?php endif; ?>
                </div>

For what purpose does PG Theme Converter add name attribute (name=“contact_form_mailer_id_5”) for submit button?

<input type="submit" value="Отправить" data-wait="Выполняется отправка..." class="submit-button w-button" name="contact_form_mailer_id_5">

Or does Theme Converter automatically add name attributes for any input tags that have a value attribute?

This is very inconvenient, since this extra field after submitting the form appears in the content of the sent emails and is saved in a custom post to the Wordpress database:

Hi @Catative,
The form action in Pinegrow is fairly simple. It reads any input tag as being for the storage of data from the sender. To have this not occur, change to a submit button. It is probably better for semantics anyway.
Sorry for the inconvenience,
Bob

1 Like

Do I understand correctly, @RobM, you recommend that the button looks like <button type='submit'>Send data</button> instead of <input type="submit" value="Send data">?

Unfortunately, by default in Webflow, the submit button is defined by the <input> tag and I have not yet been able to find a simple solution to override this tag with the <button> tag. I understand that this can be done manually, but it is not convenient when, during development, I upload new versions of my project files from Webflow to Pinegrow Theme Converter dozens of times. I also understand that it is possible to solve the problem using custom javascript code, but I think it will be a crutch solution.

Hi @Catative,
You understood correctly. Sorry for the inconvenience. Maybe approach the people at Webflow?
Bob

Thanks for the idea with <button> tag, @RobM.

Yes, I created a theme on Webflow forum