Hi Dave,
no - still the same Problem...
Hi Dave,
here's a workaround for you.
Open the text field and in the Formatting section, add a Control CSS Class name (eg. nf-TitleField).
Then expand the Validation section, and turn the Custom Validation to "Yes".
For Custom Validation Function name, put in a function name like fnTitleLengthValidation.
Save the settings, now open the Form Settings.
Expand the Custom JavaScript section and add the function below (you may need to rename it and tweak it a little to handle your function name and your class name). I've highlighted the bits you may need to tweak to work in your environment:
function fnTitleLengthValidation(source, arguments)
{
var myObj = NWF$('.nf-TitleField');
if(myObj != null)
{
if(myObj.val().length == 5)
arguments.IsValid=true;
else
arguments.IsValid=false;
}
else
arguments.IsValid=false;
}
Hope this helps as a temporary workaround.
cheers,
Vadim
You can try something like this too, swap out Title with your control's Named Reference:
length(Title.toString())!=5
Hey Mike,
that worked for you? I need to try that out again, because I couldn't get that to work in my environment, which is why I ended up doing in JS.
cheers,
Vadim
Hi Vadim,
You are right, upon testing, the code I posted only works when there are numbers without leading 0000. Good catch!
Mike
Hi,
thank you for your answers.
I have to do some tests. Today I will have a Workshop and I will be back tomorrow...
A few informations: trim and xxx.toString() aren't working. Still miss the zeros.
Now I have to test the java-solution.
Regards
Oliver
Try using regular expression,
Hi Rohan,
this works pretty well! Thank you!
And thanks to the other one's too...
Regards
Oliver