Adding attribute to the post.php form tag in wp-admin

The form is generated in file wp-admin/edit-form-advanced.php. The relevant code starts at line 410 (WP version 4.0.1). Inside the <form> tag an action is fired: <?php do_action( ‘post_edit_form_tag’, $post ); ?> so it should be easy to use this action by hooking some small function to it from functions.php: function post_form_novaidate() { echo ‘ novalidate=”novalidate” … Read more

WPDB secure custom form

When getting user input to be stored on database, a good way to proceed is: Data validation: validate the data according whith the data you expect. For example: HTML string, number, email, URL, any text with no HTML, ect. Never trust on user input or client-side validation. You can make here also some sanitization, but … Read more

Pass important values server-side when processing form

To be honest I think this question is off topic, because its topic is so a general concept that can apply to any language capable to handle web development. So is even broader than a general PHP question. By the way, what I want to suggest is too much for a comment. When you need … Read more

Form within thickbox

The issue you are running into is partially an HTML issue. Forms cannot be nested. You are likely putting this inside of another form (as a great bulk of the backend is already forms). WordPress provides good handling for receiving submitted data to extend core functionality. I suggest that you look into this and figure … Read more

Custom form not showing in correct place on page

When working with shortcode you must return a value rather than output directly. The below amendmetn should fix your positioning issue. For more informaiont, see the Shortcode API Codex, speciffically the Output section. function multipage_form() { global $wpdb; $this_page = $_SERVER[‘REQUEST_URI’]; $page = $_POST[‘page’]; if ( $page == NULL ) { /** * first name … Read more