# Add Lead to List that matches value in Hidden Form field

**URL:** https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714
**Category:** Product Support
**Created:** [November 6, 2015, 12:37am UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714 "2015-11-06T00:37:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![malcolm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malcolm/32/39_2.png) [@malcolm](https://forum.mautic.org/u/malcolm)
#### Post date: [November 6, 2015, 12:37am UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714/1 "2015-11-06T00:37:53Z")

</div>

Hi,  
  
  
  
I have multiple pages for different product and service offerings. When someone fills out a form on one of these pages, I want them to be added to an associated List. So far pretty easy.  
  
  
  
The trick is I don’t want to define one form per product/service. What I’d prefer is to have a generic form that I can use on each page, and then based on which page I place it on, it adds the Lead to the correct List.  
  
  
  
It looks like I can create a hidden field, say ListName, and then have a campaign that makes a decision based on that value and adds it to the correct List. However I have two questions:

1. How do I specify the value of ListName on each page the form appears on? I can see how to do it using the Manual HTML option, but is it possible to do it using the Automatic option (ie. the one that calls generate.js)?  
  
  
2. In the campaign, I end up with a “Form Field Value” condition"Modify Lead’s Lists" action pair for each possible value of ListName. This could get unwieldy pretty quickly. Is it possible to somehow reference the ListName hidden field value in the Action’s “Add lead to selected list(s)” box directly? ie. so it resolves it dynamically?  
  
  
  
I hope that makes sense.  
  
  
  
Cheers  
  
Malcolm

---

<div class="post-metadata">

### Author: ![malcolm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malcolm/32/39_2.png) [@malcolm](https://forum.mautic.org/u/malcolm)
#### Post date: [November 6, 2015, 12:37am UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714/2 "2015-11-06T00:37:53Z")

</div>

Hi,

I have multiple pages for different product and service offerings. When someone fills out a form on one of these pages, I want them to be added to an associated List. So far pretty easy.

The trick is I don’t want to define one form per product/service. What I’d prefer is to have a generic form that I can use on each page, and then based on which page I place it on, it adds the Lead to the correct List.

It looks like I can create a hidden field, say ListName, and then have a campaign that makes a decision based on that value and adds it to the correct List. However I have two questions:

1. How do I specify the value of ListName on each page the form appears on? I can see how to do it using the Manual HTML option, but is it possible to do it using the Automatic option (ie. the one that calls generate.js)?

2. In the campaign, I end up with a “Form Field Value” condition"Modify Lead’s Lists" action pair for each possible value of ListName. This could get unwieldy pretty quickly. Is it possible to somehow reference the ListName hidden field value in the Action’s “Add lead to selected list(s)” box directly? ie. so it resolves it dynamically?

I hope that makes sense.

Cheers  
Malcolm

---

<div class="post-metadata">

### Author: ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)
#### Post date: [November 6, 2015, 4:16pm UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714/3 "2015-11-06T16:16:51Z")

</div>

Hi, this is not currently possible right now. It’d be nice if someone could implement such a feature.

---

<div class="post-metadata">

### Author: ![malcolm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malcolm/32/39_2.png) [@malcolm](https://forum.mautic.org/u/malcolm)
#### Post date: [November 6, 2015, 11:25pm UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714/4 "2015-11-06T23:25:56Z")

</div>

Thanks, I’ll log it as a feature request when I"m back in the office Monday.

I assume you mean Part 2 is not currently possible? I think this [https://www.mautic.org/community/index.php/307-using-mautic-for-event-registration/0](https://www.mautic.org/community/index.php/307-using-mautic-for-event-registration/0) is possibly a solution for part 1. If so, I can at least make this work, it just might be a little more manual than I had hoped.

Cheers  
Malcolm

---

<div class="post-metadata">

### Author: ![malcolm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malcolm/32/39_2.png) [@malcolm](https://forum.mautic.org/u/malcolm)
#### Post date: [November 10, 2015, 12:22am UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714/5 "2015-11-10T00:22:50Z")

</div>

Posted the Feature Request here [https://github.com/mautic/mautic/issues/1152](https://github.com/mautic/mautic/issues/1152)

---

<div class="post-metadata">

### Author: ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)
#### Post date: [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/add-lead-to-list-that-matches-value-in-hidden-form-field/2714/6 "2020-02-02T22:57:14Z")

</div>


