# Checkbox and Textfield in Collection List

**URL:** <https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414>\
**Category:** How do I?\
**Created:** [September 18, 2023, 9:55am UTC](https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414 "2023-09-18T09:55:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![myb1001](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@myb1001](https://community.weweb.io/u/myb1001)\
**Post date:** [September 18, 2023, 9:55am UTC](https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414/1 "2023-09-18T09:55:25Z")

</div>

Hi again,

Small question regarding checkboxes and text inputs in Collection Lists :

When I create checkboxes I get a checkbox value variable, same for a text input element, I get a text input variable.

However when I create these elements in a Collection List, I do not get the variables, so how can I retrieve the selected values and input text ? (to update a db for instance).

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [September 18, 2023, 10:13am UTC](https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414/2 "2023-09-18T10:13:48Z")

</div>

When inputs are in a repeated element (collection list, columns ecc) you need to keep track of the values with variables and workflows.  
[This guide](https://community.weweb.io/t/are-form-variables-not-visible-while-the-form-is-in-a-collection-item/1138/6) explains how to do it. [This example](https://community.weweb.io/t/checkboxes-within-a-collection-list/1379/3) is similar, but using checkboxes.

---

<div class="post-metadata">

**Author:** ![myb1001](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@myb1001](https://community.weweb.io/u/myb1001)\
**Post date:** [September 18, 2023, 11:54am UTC](https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414/3 "2023-09-18T11:54:13Z")

</div>

Thanks !

---

<div class="post-metadata">

**Author:** ![myb1001](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@myb1001](https://community.weweb.io/u/myb1001)\
**Post date:** [September 18, 2023, 2:08pm UTC](https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414/4 "2023-09-18T14:08:10Z")

</div>

Apologies, I have a followup question related to this topic. (I have been able to solve my previous issue using your solution 🙏)

In this screenshot you can see my current radio buttons.

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

My Choices values look like this : sort(rollup(collection,“score”))  
Which gives me an array that looks like this :  
0: 1  
1: 2  
2: 3  
3: 4  
4: 5

I know this can be confusing, but might change this to text later on, so the numbers are placeholders in my list of available scores.

Anyways, I can’t get the Init value to work and pre-check one of my radio buttons : my best guess was toText(context.item.data?.[‘score’]) which results in something like “3” for instance, but that doesnt work.  
My understanding is that the init value should be a string of the choice values, where I’m I wrong ?

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [September 18, 2023, 4:17pm UTC](https://community.weweb.io/t/checkbox-and-textfield-in-collection-list/4414/5 "2023-09-18T16:17:01Z")

</div>

I suppose this is something to do with the `name` attribute of the input element. Weweb don’t allow to set it dynamically, so for the browser all the radio groups are actually the same group.  
You can switch to a dropdown as a temporary solution and chat with the team to see if that’s the problem.
