hi ,
When one field changes, another field is required to be required, and the content of this required field must contain some specified content.
At present, the required fields are required to be filled in, but the required contents are required to be filled in at the same time. I don't know how to do it.
example: if A field changes, B must require, and B must contain 'like'
behavior A filed:
if( A changes)
{
B. setRequired(true)
Bcontent = B.getValue() as String
if(!Bcontent.contains("like")){ // question is :The B filled field content is not obtained,So it has always been setError
B.setError("please input right content!")
}
else
{
B.clearError()
}
}
else
{
B. setRequired(false)
}
Best wishes !
Hi @zhangqian04
I'm not sure I completely understand, but this behaviour below makes a textfield required if any value in the selectfield is selected. I hope it can help you :)
firstly thank you for reply,but this doesn't solve my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How come? :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At present, the required field has been realized, but I don't know how to restrict it to fill in the specified contentbut at the same time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.