Shopify themes, liquid, logos, and UX
Hello there! Newbie here with a very basic question on forms, Polaris and HTML.
Whenever I add a basic polaris-based HTML form, The Submit button will post an empty message to the backend.
I am trying to get , in the post, the content of the filled fields but
Example, based on Shopify demo:
(https://polaris.shopify.com/components/forms/form#navigation)
</div>
</div>
<div class="Polaris-Layout__AnnotationContent">
<div class="Polaris-Card">
<div class="Polaris-Card__Section">
<div class="Polaris-SettingAction">
<div>
<form method="post" novalidate="">
<div class="Polaris-FormLayout">
<div class="Polaris-FormLayout__Item">
<div class="">
<div class="Polaris-Labelled__LabelWrapper">
<div class="Polaris-Label"><label id="PolarisTextField4Label" for="PolarisTextField4" class="Polaris-Label__Text">App URL</label></div>
</div>
<div class="Polaris-Connected">
<div class="Polaris-Connected__Item Polaris-Connected__Item--primary">
<div class="Polaris-TextField"><input id="PolarisTextField4" autocomplete="off" class="Polaris-TextField__Input" type="url" aria-labelledby="PolarisTextField4Label" aria-invalid="false" value="">
<div class="Polaris-TextField__Backdrop"></div>
</div>
</div>
</div>
</div>
</div>
<div class="Polaris-FormLayout__Item"><button class="Polaris-Button" type="submit"><span class="Polaris-Button__Content"><span class="Polaris-Button__Text">Submit</span></span></button></div>
</div><span class="Polaris-VisuallyHidden"><button type="submit" aria-hidden="true" tabindex="-1">Submit</button></span>
</form>
<div id="PolarisPortalsContainer"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
btw, additional context. I've managed to, by changing the button location across the different sub-elements within the form section, receive one (and only one) of the field values on the post response.
My original page/form has more fields than this example and yet, I could not make this example work
thanks in advance,
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024