Problem/Motivation

I am using a webform inside a paragraph. I have a number of the same paragraphs on the page. I've added the webform reference field in my paragraph.

When I click on the checkbox "Request More Info On This Product" (which has a conditional to make all fields in webform visible), it makes every instance of this webform visible because it is in every paragraph.

Is there a way to make each instance unique so when I click on "Request More Info On This Product" it only opens that 1 paragraph instance of the webform?

screenshot

(and thank you for a great module)

Comments

hmartens@gmail.com created an issue. See original summary.

hmartens’s picture

Thank you so much Jacob, I appreciate your help and quick response! You are a legend!

I followed the steps on your link and at first I struggled because I tried to add it in my .theme file but that didn't work. Then Nick Wilde told me I need to add it in a module.

So I ran "drush gen module" and that created a module and then I added your code into the module and it worked perfect!

Thank you so much for your help!
p.s I added my steps into this response so when someone else comes across this it might help them :)

jrockowitz’s picture

Status: Active » Needs review
StatusFileSize
new8.62 KB

I think other people are going to run into this issue. The attached patch integrates the code snippet into the webform module.

  • jrockowitz committed 8d58698 on 8.x-5.x
    Issue #3003351 by jrockowitz, hmartens@gmail.com: having more than one...
jrockowitz’s picture

Status: Needs review » Fixed
hmartens’s picture

Awesome thanks jrockowitz.

I'll leave my module in for now until that has made its way into main release :) Thank you so much for your help.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.