Let’s say I have an input with text that’s 35 characters long. Is there a way to automatically split the text among multiple inputs of up to 10 characters each?
In my scenario, I’d type in my text and then 4 new inputs would be created: the first 3 would have 10 characters each and the 4th would have 5. Can this be done with a repeating group?
Correct, in my example 4 inputs would be created. If the char count were 25 (assuming the 10 char limit for argument’s sake), 3 inputs would be created. I assume you’d use a repeating group as well.
The idea here is to auto-generate Twitter threads and then allow the user to go edit them as needed.
Hi there, @sydney22… this one seemed like a fun little challenge, and I got an example to work.
First, install the Toolbox plugin, and make sure you have the experimental parentheses feature on the Settings >> Versions tab enabled.
Next, add an input to the page where the user will enter the original text. Then, add the Toolbox’s List of Numbers element to the page, and configure the latter like this.
Next, add a repeating group to the page, and set the Data source to the List of Numbers element’s list.
Finally, put an input element in the repeating group, and configure the following expression in the input’s Initial content field.
So, that’s what I’ve got, and if I understood your post correctly, it produces the desired result, which looks like this.
Hope this helps.
this is totally awesome and is exactly what I meant. Retagging as a Tip because this seems like it’s a common feature request for so many projects. Brilliant work, @mikeloc!
FYI… I noticed that the last input in the repeating group isn’t right, and that’s just bush league. So, here is a condition on the input element that will make the last input correct.
This topic was automatically closed after 70 days. New replies are no longer allowed.