# Form Creator for Tickets

**URL:** <https://community.weweb.io/t/form-creator-for-tickets/9233>\
**Category:** How do I?\
**Created:** [June 20, 2024, 10:04pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233 "2024-06-20T22:04:55Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 20, 2024, 10:04pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/1 "2024-06-20T22:04:55Z")

</div>

I want to make a ticket software, where users can decide for themselves, how many fields they need.  
For that I decided on following design:

 ![Screenshot 2024-06-20 212211](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/ddf36ec10a84fc2ed7c72625e3ea43178f54a6e9.png)

My structure is this:

- An empty Array that should store all the objects
- Each object should hold the information of the title and description field

The “Title” and “Description” field in the screenshot above, are Input fields so the user can write into it.  
To enable the user to create a custom amount of objects (Title, Description combination), I put the “Title” and “Description” field into a div\_group and then put the group into a collection list.

- The collection list displays as many items as there are in the Array

* * *

My Problem now is that I can’t get this to work. These would be some questions of mine:

- How can I get the information of the input field?  
 → Reason for that is, that when I put the group into my collection list I cannot acces the input fields anymore.
- What would the structure look like with focus on variables (Array that stores data and workflows)

* * *

Would really appreciate it if someone could show me how this would or could be done.  
Thanks for any answer

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 20, 2024, 10:16pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/2 "2024-06-20T22:16:52Z")

</div>

You probably need an array of objects and each field should modify the array/object at a specific key or index.

---

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 21, 2024, 11:48am UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/3 "2024-06-21T11:48:59Z")

</div>

That’s what I thought as well. But this is when the problem occurs.

- When I use the div\_group (with the 2 input fields in it), just as itself somewhere in the project. I get in my data tab a related data field, for each input field, where I can access the value of these fields.

This implementation would require a static amount of this div\_group.  
But I want my users to have a custom amount of these groups. That’s why I put them into a collection list and binded the “items to display” to my array variable (same can be done with putting them in an extra div group).

Now the error occurs.

- When the div\_group (Title, description input combi) is in a collection list, there are no data fields in the data tab anymore. that are related to the input fields.  
This results in me not being able to access the value of my input fields anymore.

I’m not sure if I have a logical error caused by lack of knowledge, but I don’t understand why this happens.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 21, 2024, 12:09pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/4 "2024-06-21T12:09:11Z")

</div>

You need to handle their values manually, by adding an onchange workflow and setting their value to a variable/object manually.

---

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 21, 2024, 5:01pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/5 "2024-06-21T17:01:26Z")

</div>

I think I get what you are trying to say, but when it comes to the part of choosing which variable/object I want to pull the value from, I get stuck.  
Reason for that is that I cannot chose the value of my input\_field.

* * *

When I have my input fields just normally and static in my project I can find my value in a connected data variable:

 ![Screenshot 2024-06-21 172724](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/5077e95f50b442ed95d9439cd5fed81a979d42ab.png)  
 ![Screenshot 2024-06-21 171423](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/05cc6f59506d699065865042366e739817a78da0.png)

* * *

Now when I put both input fields in a collection list (to make it dynamic to the user) I cannot access the input fields values anymore.

 ![Screenshot 2024-06-21 172724](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/5077e95f50b442ed95d9439cd5fed81a979d42ab.png)  
 ![Screenshot 2024-06-21 172121](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/1f7a5334519bb5a7d2b15593f78c756823edef0c.png)

- Here the value fields in the data tab look empty, even though the input fields have a value

* * *

From what I can observe. The moment I try using a collection list, to make it dynamic, the input fields are unable to store their values anymore.

I don’t understand how I can get the values of my fields this way. It’s kind of hard for me to grasp what is going on with that. Because I don’t think the collection list should change the way I pull values from my input fields.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 21, 2024, 5:06pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/6 "2024-06-21T17:06:51Z")

</div>

That’s fantastic! You’re close enough. You can use the event.value from the “lighting bolt” tab. When you are in the on-change event.

---

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 21, 2024, 5:11pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/7 "2024-06-21T17:11:31Z")

</div>

Wow! Thanks a lot!  
Got it working thanks to you!  
Much thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 21, 2024, 5:28pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/8 "2024-06-21T17:28:15Z")

</div>

I’m sorry to still bother you, but after fixing the problem with getting values into my array. I know face problems in putting the values into a desired object.  
Right now my object gets replaced by the value of the title or description field instead of adding it into the desired field.

* * *

My logic looks like this:

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/ab680437fd29f50ef5208fabc1938c13e972e6a9.png)

I have an empty array that’s supposed to store the actual info of each object. The one below is the template that I add to the the array above, when I click the “Add Extra Field” button.  
With this structure I implemented the workflow such as:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0e39e80af6edafa29b030e2fb8bb01822df49e22.png)

- Index = Item.index
- Path = Item.data.title
- Value = Event.value

* * *

It seems I might have to add some more logic to either the “Path” or “Value”.  
Any ideas why that happens?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 21, 2024, 5:51pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/9 "2024-06-21T17:51:47Z")

</div>

You probably might want to do path just to be the path of the object. Meaning that if you wanna change the title, then you just do `title` as a path.

---

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 21, 2024, 6:10pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/10 "2024-06-21T18:10:21Z")

</div>

If I understand you correctly, I think I did this.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/473a3a5b434800a456c57c1d7879a41ecffb98ae.png)

Afer adding 1 empty object my array looks like this:

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c867c3ddbc453241cb94ccb02dfae765f6fcfe3d.png)

And after putting something into my title\_input, the array looks like this:

![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d4dc92b6f0486b3d6303db37ff32186eaa036d96.png)

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [June 21, 2024, 6:15pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/11 "2024-06-21T18:15:21Z")

</div>

You just need to bind the string value of that property, if you wanna set title, then you write title, if description, then the path is only “description”.

---

<div class="post-metadata">

**Author:** ![Makorus](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@Makorus](https://community.weweb.io/u/Makorus)\
**Post date:** [June 21, 2024, 6:41pm UTC](https://community.weweb.io/t/form-creator-for-tickets/9233/12 "2024-06-21T18:41:57Z")

</div>

Got it, thanks again!
