Hello,
I am trying to use a javascript to set a textbox to write if the SQL query returns null data and does not fill out the textbox. I am having trouble incorporating this into workflow. I added the script to the form and create an onload event to call the function.
I also tried adding the function to an event on the text box using onactivate, but it doesnt seem to work properly. I set the text box to read only in workflow, then when the form loads and has no data in the field, i can write to it. Once i click on the submit button all fields reset and error out saying field required. Has anyone gotten this to work?
function ReadOnly()
{
var text = document.getElementById("textbox").value;
if (!text.match(/\S/))
{
document.getElementById("textbox").readOnly = false;
}else
{
return true;
}