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

**URL:** <https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975>\
**Category:** Pinegrow Theme Converter\
**Tags:** bug\
**Created:** [December 1, 2021, 3:35am UTC](https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975 "2021-12-01T03:35:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)\
**Post date:** [December 1, 2021, 3:35am UTC](https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975/1 "2021-12-01T03:35:15Z")

</div>

Hello.

_ **Webflow** _ service generated the following form code for my project:

```auto
                <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:

```auto
                <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:

 ![3333](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/5/562e9c3b8a7c5de74257adb2fc3226f107f97d30.png)

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [December 1, 2021, 6:37pm UTC](https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975/2 "2021-12-01T18:37:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)\
**Post date:** [December 7, 2021, 4:52am UTC](https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975/3 "2021-12-07T04:52:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [December 7, 2021, 11:01am UTC](https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975/4 "2021-12-07T11:01:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Catative](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/catative/32/4019_2.png) [@Catative](https://forum.pinegrow.com/u/Catative)\
**Post date:** [December 7, 2021, 11:15am UTC](https://forum.pinegrow.com/t/for-what-purpose-does-pg-theme-converter-add-name-attribute-for-submit-button/5975/5 "2021-12-07T11:15:11Z")

</div>

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

Yes, I created a theme on [Webflow forum](https://discourse.webflow.com/t/how-can-i-change-the-input-tag-of-the-standard-form-submit-button-to-the-button-tag/191140)
