Appending to a text field
September 29, 2016 12:00 AM
I'm trying to append text to a text field and then display it on the screen. For example numbers like 01, 23, 11 and so on or text like cat, dog, etc. based on user input. For some reason solution evades me. Any ideas?
Discussion (6)
You need an extra variable to sum up the initial value of the textfield and all added values, so the text in the textfield can be replaced completely.
I've attached an example in that you select animals with checkboxes. The selection is displayed in a textfield.
Tim
Hello Tim. I tried "change content" but that would replace whatever already is in the text field. What I want it to do is append to existing text. For example, you start out with a text field with a word "dog" in it, then when you click a button it would add a comma and a word "cat" to it and so on so it looks like this (dog, cat,...).
You can use the "Change content" action to get the value from an input field (or any variable) into a textfield.
Tim
Hi Nick,
good observation, the checkbox variable can have only two states, "on" (= checked) or empty (= unchecked), so "Not empty" would be the same as "Equal to on".
Tim
Hey Tim,
I noticed that for the actions of the checkbox, you had it set to var equal to on.
Is there any difference in functionality to having this as checkbox is not empty?
I've tested and from what I can see it works the same, but as your experience is far greater than mine, I thought I'd ask the question.
Discussions have been disabled for this post