This routine works fine, but I would like to pre-set the values.
and in the passage I use the standard code
My screen has a menu of input fields using the above Javascript, then I progress to the next passage, which prints a report based on the inputs.
I would like to back up to the input screen and change one or more fields and then reprint.
But of course all the fields are blank and have to be re-entered
I tried
But that just pre-sets the data field with the literal "$Value1" rather than its contents
if (typeof window.customScripts == "undefined") { window.customScripts = { updateNamedHook: function(hookName) { var value = $("input[name='" + hookName + "'], textarea[name='" + hookName + "']")[0].value; // Find the named hook node and set the text inside. $("tw-hook[name*='" + hookName + "']").text(value); } }; };
and in the passage I use the standard code
[]<Answer1|. <input type="text" name="Answer1" value="">
My screen has a menu of input fields using the above Javascript, then I progress to the next passage, which prints a report based on the inputs.
I would like to back up to the input screen and change one or more fields and then reprint.
But of course all the fields are blank and have to be re-entered
I tried
<Answer1|. <input type="text" name="Answer1" value=$Value1>
But that just pre-sets the data field with the literal "$Value1" rather than its contents