How take value in the richtext dinamically on a list

hello community I have a problem with this scennario context:

I have a list with richtext and i need to take the text on html format in each item inside the list.
for example:
the user should be complete a contract then, the user should create n number of clause and save it one by one.

I have a a wf like this

JS:

const index = context.item.index;

const clausula = {

titulo: document.getElementById(`titulo${index}`).value,

informacion: document.getElementById(`info${index}`).value

};

return(clausula);

to take the value on the input and the richtext then i take the object and put it in the array with the same index.

the tittle input and the richtext has a html id
tittle: "titulo" + context.item.index
richtext component: "info"+context.item.index

The problem:
when I click on the WF the JS deteting only the tittle value but not the info or richtext value

image

how can I find the richtext value? Regards!

why don’t you on change of the rich text save to a variable array and then just reference that when you save

2 Likes

you right! I set up a wf with the action “on change” then save the value on a variable.

thanks!

1 Like