Skip to content

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

Merged
junedkazi merged 1 commit into
bigcommerce:masterfrom
sacr3dc0w:duplicate-id-review-form
Jun 20, 2018
Merged

Fix duplicate input ID's in product review form#1276
junedkazi merged 1 commit into
bigcommerce:masterfrom
sacr3dc0w:duplicate-id-review-form

Conversation

@sacr3dc0w
Copy link
Copy Markdown
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
Copy Markdown

bigbot commented Jun 18, 2018

Autotagging @bigcommerce/storefront-team @davidchin

<!-- 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
Copy Markdown
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.

3 participants