The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Hiding dropdown selectors on certain products

Hello all!

I'm using Foxy with Webflow and I'm a little stuck. I've added some product options (Colour and Size) which are working fine if both are needed.

Some items in the CMS have just size as an option, and a lot have no need for an option. How do I hide these selectors?
This is the code I'm currently using on the product page. (The Values are Webflow dynamic fields)
Example product page (in development) here:

<form action="" method="post" accept-charset="utf-8">
<input type="hidden" name="name" value="{{wf {&quot;path&quot;:&quot;name&quot;,&quot;type&quot;:&quot;PlainText&quot;\} }}" />
<input type="hidden" name="price" value="{{wf {&quot;path&quot;:&quot;price-in-gbp&quot;,&quot;type&quot;:&quot;Number&quot;\} }}" />

<select name="Size" class="w-select size" required>

<select name="Color" class="w-select color" required>

<input class="big-addtocart" type="submit" value="Add To Cart" />

I'm also a little lost when it comes to the live updating of the price.

Many thanks!
  • fc_joshfc_josh FoxyCart Team
    Hi @MagicMark.
    Thank you for getting in touch. I have responded to your questions below:

    Hiding Empty Select Field
    To conditionally hide variants that don't have any options, please follow these instructions:

    1) In your html embed, add a containing div to each dropdown, with corresponding class name, like this:

    2) In your Item Collection Template (in the closing BODY code section, in between the script tags) add the following:

    if ($('.size-container select').has('option').length == 0) {

    if ($('.color-container select').has('option').length == 0) {
    Ensure the class names match what you put in your html embed.

    Real-time Pricing
    It looks like there were some steps missed from the instructions. Please refer to these steps: Let us know if you run into any issues.


  • Thank you Josh,

    The hiding of the selectors is now working perfectly.
    The live update of the pricing is working too. I'd set the price in the code to £0.00 and then after a nights sleep realised it should be the dynamic price.

    I just have two minor issues now, one is that my decimal is set at 1.00 and the price shows correctly everywhere else except in the live price. If the price is £21.20, the live price shows £21.2 and drops the last zero.

    The other minor thing, is although I've styled the submit button on the Add to Cart, on iOS it displays the button as rounded with a gradient and is quite ugly. Is this a webflow issue or something you could help with too?

    Highly appreciate your help!
  • fc_joshfc_josh FoxyCart Team
    Hi Mark.
    Glad those issues are resolved now. For the price (with dropped zero) this seems to be caused by Webflow. Here is a screenshot of the price displayed in Webflow's Designer before Foxy does anything with it: I recommend changing the number format to "Any format" like this: Lets see if that fixes things. If not, you will want to reach out to Webflow's support.

    For the add to cart button mobile styling, browsers can sometimes have their own overrides or defaults. You may need to add some mobile-specific styling in Webflow's Designer.


  • I'll reach out on the Webflow forums then.

    Thanks again!
Sign In or Register to comment.