I have a text box control that I'm wishing to apply custom field validation to. The data I'm validating in the text box is used as a primary key in the database I've set up. I need custom validation controls that allow me to check for duplicates before the data is submitted.
I would like the user to be prompted to enter different input if the validation returns that the data exists.
you better add OnTextChange property to textbox and perform the primary key validation in that function.
Related
I am using Ninja form and I have a checkbox field. On click of this checkbox I have two input fields which are displayed. I have to make both the fields as required. How can I make both of them required?
I've used jQuery to add required property but when I click on submit the form is submitted without showing any errors.
I
Know a Employee
Employee Full name
Employee Email
I used the conditional logic extension for showing and hiding the two input fields on checking and unchecking of the Checkbox. Also, Used jQuery for acheiving the same functionality. Expected output, On checking the checkbox, Both the fields should be visible and required before submitting the form
Scrap the extra jQuery, just simply make the fields required using the
provided toggle option
Then setup the conditional logic so that the fields are hidden when they're not checked and vice versa. When the fields are hidden it will act as if they don't exist, meaning you will not be required to fill out the hidden required fields to submit. But when the box is checked and they show again you will have to fill out the fields. If this doesn't work try updating your conditional logic add-on, as I don't think it always worked like this.
I have a radiobutton list that the items are dynamically filled. Now, I have a required field validator that works as expected (if I do a postback, it will ask me to select an item in the radiobuttonlist).
When I click on Next, I clear the radiobuttonlist, and dynamically fill it again with the next set of data. But now, the required field validator's message is already there asking me to select an item (without doing a postback).
Any ideas to make the required field validator message only become triggered if I do a postback?
Thanx
You should be able to disable the required field validator client side validation with the following:
ValidatorEnable($("#<%=ReqVal.ClientID%>")[0], false);
Replace the ReqVal with the id of your RequiredFieldValidator that you want to disable.
Is it possible to prevent axapta from remembering entered values in a form input field so that when the user has entered one value, they do not get a highlighted proposal for what they could enter?
Yes, it is possible.
Set the AutoDeclaration property of your control to Yes.
Execute element.delAutoCompleteString(NameOfYourControl); in one of your form's methods e.g. in init.
I have four fields on my screen and I want the user to at least enter a value for one of the fields. I want a popup message similar to what you can do with a validate control to popup when none of the fields have a value entered.
Is there a way to do this with the stock validate control in ASP.NET?
I know how to do this is JavaScript, I just wanted to see if there was an easier way first.
I think you can validate this using a groupbox control
In one of our projects we want to show the "Required field validation error" by changing the border color of the corresponding textbox. our page contains a lot of required field validator,regular expression validator etc. But we want to highlight only the required field errors.
Is there any way to do this without using any custom validation function.?
or Is there any method to find all the required field validators in a page in the client side. If we can find this i think we can highlight the corresponding error textbox
one option, maybe less annoying than switching to custom validators, is to create your own javascript validation function that is triggered with a submit click. from here you can change the appearance of the invalid fields.