All Questions
Tagged with forms validation
32 questions
0
votes
0
answers
431
views
Validate a custom form with js and php
I would please need help with the following: I have a form in my WP Plugin, that is validated with js, which works fine, Then I want to validate it using php, display the errors on the form and after ...
0
votes
1
answer
94
views
Contact form - problem with displaying message about sent mail
I'm trying to develop a contact form for a language school website that runs on Wordpress.
Disclaimer: I'm about 6 months into coding, so please forgive me for being new to this. I'm developing my own ...
0
votes
1
answer
985
views
How to add custom regex validation to WPForms password field
I'm using WPForms Pro and I'd like to add custom requirements to the password field on a form.
I know that the password field has a password strength requirement setting, but I have specific rules I'd ...
1
vote
0
answers
31
views
Can I use custom CSS and js plugin to put JavaScript in to validate my forms
I would like to put some front-end JavaScript validation to my forms, but was wondering, if I can put the JavaScript for the field validations in the custom CSS and js plugin, or do I need a specific ...
0
votes
1
answer
201
views
Add Server Side validation in Ajax mail form
I'm building a form that takes fields values and send them via wp_mail to the post author.
It works, but I want to add a server side validation to improve security.
I don't know where to add my ...
0
votes
1
answer
737
views
How to add fields in custom registration form, validate it and aave to db? [closed]
I use a WP theme with a custom registration form. I want to add two fields to it (for phone number and company name). What to add to the php file of the form and what to the function file of theme ...
1
vote
1
answer
2k
views
Form validation in WordPress Admin Panel
I am developing a WordPress plugin. In this regard I am gathering data from User using a Form via Wordpress Admin Panel. My code is like below
<form method="post" name="newAddress" id="newAddress" ...
0
votes
1
answer
841
views
jQuery Validation plugin and Bootstrap 4 CSS classes
I'm using jQuery Validation plugin to validate a WordPress theme form. I'm using also Bootstrap 4 so I'd integrate the Bootstrap validation classes ("is-valid" and "is-invalid") with Validation plugin,...
0
votes
1
answer
1k
views
Using $wpdb | checking entered email against existing emails in db
Without ranting too much, here is my snippet:
if (empty($_POST["email"])) {
$emailErr = "Email is required";
} else {
$email = test_input($_POST["email"]);
// check if e-mail address is ...
0
votes
1
answer
2k
views
Add file upload with validation to custom form
I have a custom contact form page that I am trying to add an upload field that validates filesize and filetype. Before adding the validation everything worked.
<?php
/* Template ...
0
votes
1
answer
149
views
Passing form data on submit
In my sanitizing script, prior to using the POST Request method to submit this data, I have the following for my textarea input field named 'contact_msg':
if($_POST['contact_msg'] != ''){
$...
0
votes
0
answers
183
views
Form Sanitization and Validation
Already asked this on Code Review but no answer there so that's why i'm trying here.
I'm kinda new to form sanitization and validation. If someone could look at my code and tell me where i could do ...
0
votes
1
answer
927
views
Required radio button does not validate in form, when clicked through Javascript/jQuery
I have a radio button that selects a dealer in my checkout. I need this button to automatically be checked for the user - however, no matter what I do, the radio button still needs to be clicked to ...
0
votes
1
answer
563
views
Custom HTML form using PHP - help with ajax/username validation
I currently have a working registration form I created on my page. It's an HTML form and I coded PHP to have it create the user in our WP_user table and email us with info from the form. The PHP is in ...
0
votes
1
answer
322
views
media_handle_upload on mix form fields (not required file input)
I collaborate with the development of the theme Odin Framework, which has several classes that leverage the launch of a site from scratch.
Among them, we have the abstract-front-end-form.php (link to ...
2
votes
2
answers
1k
views
How to retain the values from dropdown category lists after wrong form submission?
I can't figure out the the code for - How to retain the values from dropdown category lists after wrong form submission? Any suggesstions, thanx in advance.
<select class="selectpicker btn-block" ...
1
vote
1
answer
4k
views
Validate form in functions.php, send errors back to template
I have a form in a template that upon submission should be validated, and any errors should be displayed, and if no errors, insert the data into the database.
I'm new to wordpress, but my idea was ...
0
votes
0
answers
1k
views
Displaying errors on the front end from my plugin
I am creating a plugin that has a frontend form, which in turn has some validation.. Errors if validation fails and success if it passes. I have tried everything and can't get messages to appear on ...
1
vote
2
answers
578
views
Show the submitted values in the form when validation fails
Currently I do:
$options = get_option( 'jons-plugin-options' );
echo "<input id='jons-plugin-options[field-two]' name='jons-plugin-options[field-two]' size='4' type='text' value='" . $...
1
vote
1
answer
1k
views
How to use the built in tooltip for form validation error messages in WP admin plugin?
I'm building a wordpress plugin that includes serveral menus in the wordpress backend (admin).
I'd like to use as many existing parts as possible and make my menus look like the standard wordpress ...
1
vote
1
answer
3k
views
Add Div to Comment Form
I have some code that displays my comment form and my custom validation, what I'd like to do is add a div right underneath the title, but I'm not sure how to do that because that code is generated...
...
0
votes
1
answer
2k
views
jQuery Live Form Validation in Wordpress
I'm trying to implement the form validation that can be found at: http://www.geektantra.com/2009/09/jquery-live-form-validation/
I can get the demo above working, but when I implement it on my ...
0
votes
3
answers
4k
views
Validating custom fields before post save
After much unsuccessful searching, I'm hoping someone here can help me out. I am using Advanced Customs Fields (I assume most people are familiar) to create a post from the front end. I want to ...
2
votes
1
answer
2k
views
jQuery Validate wp_editor
I have a form, and in the form, I use
<?php wp_editor('', 'user_submitted_progress', $settings = array('textarea_name' => 'user_submitted_progress')); ?>
to generate a TinyMCE, rather than ...
0
votes
1
answer
187
views
WordpressUser Submission Form
I have a User Post Submission form, and it has three issues, as well as one potential issue.
Here is the code that processes the form.
<?php if(isset($_POST['user_submission_form'])) {
if(...
0
votes
1
answer
6k
views
Remember form field values with page navigation
I have a form on a page template that controls which posts show up on the page and how those posts are ordered. You can see what I mean here: http://www.theseattlevine.com/the-vine
The questions I ...
0
votes
1
answer
2k
views
Front end post form validation
I have a front end post from that works fine except for the validation that I need done before it's processed. Ultimately I'd like to be able to do this with ajax because I have to do some things like ...
0
votes
1
answer
1k
views
Form validation on user profile edit
I have added a custom field to user profiles in bbPress however I am unsure how to do form validation other than javascript. I would like to do some PHP validation however the few things I have tried ...
1
vote
1
answer
1k
views
Multiple options pages validation for a plugin
I am writing a plugin and I decided to have multiple pages for different options of the plugin (for clarity's sake). Doing a single option was a piece of cake, but I'm encountering difficulties when ...
0
votes
1
answer
98
views
Where this validating message come from?
I wrote a simple form, including text field, textarea, select and some validating by WP_error. When I try to submit the form without filling text field or textarea, I got a popup tip pointing the ...
2
votes
2
answers
3k
views
How can i add validation to this login form with out it redirecting to the wp-login.php page
Im using the code as posted on the website below, to create a hard coded login form.
http://www.wprecipes.com/add-a-login-form-on-your-wordpress-theme
What would be the best way of incorperating some ...
1
vote
1
answer
3k
views
Display all WP Errors together during form validation
I have a custom front end page where users can post from. All works fine but the i want if more than one field is empty then the errors for all empty fields should show all together. Right now the ...