Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate input ID's in product review form #1276

Merged
merged 1 commit into from
Jun 20, 2018
Merged

Fix duplicate input ID's in product review form #1276

merged 1 commit into from
Jun 20, 2018

Conversation

sacr3dc0w
Copy link
Contributor

@sacr3dc0w sacr3dc0w commented Jun 18, 2018

What?

Duplicate ID's were in the DOM on the write review form. This was happening because ID's weren't
being passed to the form components.

Before
{{> components/common/forms/text name="revfromname" label=(lang 'products.reviews.form_write.name') value=product.reviews.author}}

After
{{> components/common/forms/text id="writeReview-name" name="revfromname" label=(lang 'products.reviews.form_write.name') value=product.reviews.author}}

Documentation

Sreenshots

Before
01 - before

After
02 - after

@bigbot
Copy link

bigbot commented Jun 18, 2018

Autotagging @bigcommerce/storefront-team @davidchin

@@ -39,25 +39,25 @@ <h5 class="product-title">{{ product.title }}</h5>

<!-- Name -->
{{#if product.reviews.author}}
{{> components/common/forms/text name="revfromname" label=(lang 'products.reviews.form_write.name') value=product.reviews.author}}
{{> components/common/forms/text id="writeReview-name" name="revfromname" label=(lang 'products.reviews.form_write.name') value=product.reviews.author}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just use the name attribute as the id value so it is consistent with what we have on other forms in cornerstone.

@junedkazi junedkazi merged commit 99b32c1 into bigcommerce:master Jun 20, 2018
@sacr3dc0w sacr3dc0w deleted the duplicate-id-review-form branch June 20, 2018 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants