Streaming live at 10am (PST)

Select field choice to hidden and show

Hello :slight_smile:

If “sanded and painted” is choice - then required and show “RAL Color field” else hidden (See image below)

How do I do it

image

Share a project link perhaps?

Of course :slight_smile:

https://preview.webflow.com/preview/nicolajbroe?utm_source=nicolajbroe&preview=e5527f517e910baceeebedc7af58053a

Which page is this form on if you don’t mind?

at the bottom of “3D PRINTING SERVICE” page

Here you go. Put this in the footer code section of this page. You will need to set the RAL COLOR field to display:none initially.

<script>
	$(document).ready(function(){
      $('#Surface').on('change', function() {
          if( $(this).val() === 'sanded and painted' ) {
              $('#Ral-Color').fadeIn();
              $('#Ral-Color').attr('required','required');
          } else {
              $('#Ral-Color').fadeOut();
              $('#Ral-Color').removeAttr('required');
          }
      });
	});
</script>
1 Like

Thanks - Work perfect :slight_smile:

1 Like

Hi @AlexManyeki, I’ve used this code to hide/show a collection and it worked. The only problem is that my collection has pagination with 3 pages of items, and with this code it’s showing only the first pagination page.

Perhaps you could help me? How can I adapt this code to show all other pages within the pagination?

Published link: https://select-fieldd.webflow.io/

Read-only-link: https://preview.webflow.com/preview/select-fieldd?utm_medium=preview_link&utm_source=designer&utm_content=select-fieldd&preview=8d043198a5227e2613d7d967f81f3fd9&mode=preview

Thanks in advance! :smile:

You’ll need to share your site as described here Posting Guidelines for the Code Help Category

1 Like

Hi @samliew, already fixed! Thanks for letting me know :smile: