I work with a data entry site on a chrome webpage. There are mulitple text boxes I need to fill but they are spread out thoughout the document. I know all the inputs to each box. I don't want to scroll and click or tab into each box. I just want 1 UI pop up box to enter all the data, and it get's populated in the correct boxes.
For example.
chrome pages:
page 1: Color: _________
Page 2: Color: __________
I'd like a UI box that pops up, I can enter "red" and "green" and red will be populated on page 1 and green on page 2. I never have to manually navigate.
It's a smiliar idea to the "click element" feature, except instead of clicking an element, it would be inserting predetermined values into various text box elements thoughtout the form.
Hope this makes sense, thanks.
Hi @Jack_Guccione Welcome to the forum! 
If the text boxes are on the same Chrome tab, you can use the {click} command to perform this task, with a snippet similar to the one below:
{note}
Enter your values here:
{formtext: name=First color; default=Red}
{formtext: name=Second color; default=Green}
{endnote}
{click: selector=first-field}{=`First color`}
{click: selector=second-field}{=`Second color`}
This roughly follows the order:
- Enter all your values at the start.
- Click the first field to activate it.
- Insert text into the active field (the first field)
- Click the second field, which activates it.
- Insert text into the active field (now the second field)
You need to generate the selectors for both the {click} commands based on the guide here (https://www.youtube.com/watch?v=r0QUM6JAgQI).
If the text boxes are on different Chrome tabs, the current approach will not work, but we are working on improving this soon!
1 Like
Thank you this worked! Exatly what I needed.
As a follow up: say I input the incorrect data and want to re- input. Is it possible to run the snipit again, enter new info, and have the new data overwrite the old data instead of inserting new data next to the old data?
I see. Try this:
{note}
Enter your values here:
{formtext: name=First color; default=Red}
{formtext: name=Second color; default=Green}
{endnote}
{click: selector=first-field}{key:ctrl-a; mac=cmd-a}{key:backspace}{=`First color`}
{click: selector=second-field}{key:ctrl-a; mac=cmd-a}{key:backspace}{=`Second color`}
This roughly follows the order:
- Enter all your values at the start. (You will need to enter all values, even the ones that did not change.)
- Click the first field to activate it.
- Select all text in the field and press Backspace to clear it (NEW)
- Insert text into the active field (the first field)
- Click the second field, which activates it.
- Select all text in the field and press Backspace to clear it (NEW)
- Insert text into the active field (now the second field)
Thank you this works great.
2 related form questions:
-
The form I use has nested option buttons or radio buttons: If I click "what is the color of the sun" button, then 2 nested options will appear underneath with "black" "yellow" and I can only choose one of the options. Can text blaze show me a pop up UI where I can make all selections like this? Again, only 1 choice is possible.
-
Same scenario as above except there are multiple options to choose. EX: "how many colors are there in the rainbow" -> 10 nested buttons appear of color options --> can click multiple options.
Gaurang, thank you this is helping my work immensely.
JG
Sure, I'm happy to help. Text Blaze can do all sorts of program logic. I recommend first checking out our {formmenu} command, which is useful for making choices:
and {if} command for running actions based on choices:
Your snippet would look roughly like this:
- {formmenu} command to make the choice
- {if} command to check if the choice = "yellow"
- {click} command to click on the yellow option
- {elseif} command to check if the choice = "black"
- {click} command to click on the black option
- {elseif} command to check ... (and so on for all options)
- Final {endif} to terminate the conditionals.
Please try this out, and if you get stuck, feel free to share a rough draft of your snippet with me so I can take a look.
Best,
Gaurang