When a command is executed in a input it deletes/removes the text from the input.
My question is how can I stop this so it will retain the text within the input?
Well you see that is the thing I am currently using four input fields to draw data from for a sumbit form but want to make it so you can click "recall" in side of the inputs to activate the command instead of having to click the "Sumbit" button everytime.
Also in my method it is drawing text from four fields. To use the winset()would I have to make a command for each field so it would know which box to refil in the text? Curious why an option to allow it to stay when a command is used is not currently in use. |
Instead of making a separate command for each field, you can pass an argument through the command to the verb. For example, you might set your verb up like this to have 'Return' move to the next form element:
mob And then for your input controls, you would set your commands like this: nameInput's command: NextFormElement "nameInput" "ageInput" " ageInput's command: NextFormElement "ageInput" "jobInput" " jobInput's command: NextFormElement "jobInput" "!submit" " ...for an example form with a "Name", "Age", and "Job" input. The first text string is the name of the input control with the command, and the second text string is the is the name of the input control you want to have focus after they press 'Return'. The quotation at the end is important to ensure that the value the player entered is passed along as a third argument. Shadowkaroth wrote: Curious why an option to allow it to stay when a command is used is not currently in use. That's a good question. You could try making a Feature Request for it. A fair number of people might find it useful. |
In response to DarkCampainger
|
|
I must say this is a great way to do it, thank you.
You would think BYOND would have some setting to do this it's self but I do appreciate the help. |
Usually this type of option is used for forms, such as for a "Name" input field, which you would then process after a "Submit" button is pressed.
Alternatively, you can use winset() from the command that is executed to re-fill the input, but there may be a slight delay that might frustrate users.