Hi Team,
In a custom input form, we have a text field. Here we need to avoid few special characters like @ $ % etc.,
How can i make it possible?
For example,
<input xpath="@textField"/>
Thanks and regards,
ParthaSarathy.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi ,
You can use Regex for this.
In your form use Leave tag like below and use soapcall tag and specify new function which you will create in JavaScript file.
<leave>
<soapCall name="functionName" service ="">
<param exprIn="[give full path of field you want to check]" type="string"/>
</leave>
Make sure : In Javascript file , function you define have syntax like below
namespace_schema_fucntionName(test)
{
var res= test.match(); // Use regex here to find special character
if(res==null)
{
alert("special character found")
}
}
Thanks,
Kapil
Views
Replies
Total Likes
Hi,
You can check on form save/close with:
<check expr="@textField not like '%@%' and ..."><error>Invalid character</error></check>
To replace *all* special characters with '_', at a schema level, use dataPolicy="identifier" on the attribute- no form work needed.
Thanks,
-Jon
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi ,
You can use Regex for this.
In your form use Leave tag like below and use soapcall tag and specify new function which you will create in JavaScript file.
<leave>
<soapCall name="functionName" service ="">
<param exprIn="[give full path of field you want to check]" type="string"/>
</leave>
Make sure : In Javascript file , function you define have syntax like below
namespace_schema_fucntionName(test)
{
var res= test.match(); // Use regex here to find special character
if(res==null)
{
alert("special character found")
}
}
Thanks,
Kapil
Views
Replies
Total Likes
Hi Team,
I am facing a issue on web page, it not taking special character.
document.write(ctx.event.webAppFields.@longDescription);
Printing "worldâ™s " instead of world's
Please help here,
Thanks
Views
Replies
Total Likes
Views
Likes
Replies