Tag Info

New answers tagged

1

I think you will require to custom develop some part of it but most of it can be done with Contact Form 7 plugin. You can create forms with upload fields very easily in Contact Form 7. And you can make it visible for loggenin users only like this. <?php if ( is_user_logged_in() ) { echo do_shortcode('[contact-form-7 id="91" title="Form"]'); ...


0

I guess it depends on how much work you're wanting to put in. Gravity Forms plugin will do most of what you want (with some customization), or you could write something completely from scratch: maybe something like registering an "application" CPT that has all info as meta data, and you can sort/filter by user. I don't think adding all applications to user ...


0

Your question can be done using standard PHP, there is nothing special with WordPress you need to do ( assuming this is a frontend form ). Lets say you have a form with 6 inputs. You want them to appear on 3 pages. Lets work off of this pseudocode: if form submitted do checks and handle form else display input 1 display input 2 display ...


0

Can I fix your code ? $uploaddir = wp_upload_dir(); $file = $_FILES[ ... whatever you have in your POST data ... ]; $uploadfile = $uploaddir['path'] . '/' . basename( $file['name'] ); move_uploaded_file( $file['tmp_name'] , $uploadfile ); $filename = basename( $uploadfile ); $wp_filetype = wp_check_filetype(basename($filename), null ); $attachment = ...


0

Add the following condition before the file upload functionality - $allowedExts = array("pdf", "jpg", "png"); $temp = explode(".", $_FILES["attachment"]["name"]); $extension = end($temp); if ((($_FILES["file"]["type"] == "image/pdf") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/png")) && ...


0

Not exactly sure which text you are referring to but one of these may help or at least give you some idea: add_filter( 'comment_author_says_text', 'sp_comment_author_says_text' ); function sp_comment_author_says_text() { return 'author says'; } add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' ); function sp_comment_form_defaults( ...


0

I solved the problem. First I check if there are errors and then I add a custom redirect url like this: if ( count($error) == 0 ) { wp_redirect( get_permalink() . '?updated=true' ); } And finally I added a message using 'GET' method: <?php if ( $_GET['updated'] == 'true' ) : ?> <p class="form-submit-success" style="color: green">Your ...


2

If I'm understanding you right you just are having trouble getting the from set? the easiest way would just be adding the from in the email headers in the wp_mail function. Here is an example of one of my old simple email sending functions that works function contact_send() { $title = 'New message Received'; $headers = array('From: ...


2

From: is just another mail header. You need to concatenate this with your current $headers and pass it as one argument to mail(): $headers = "From: $sender <$senderEmail>\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; // la de da mail( $recipient, $subject, $mailBody, $headers );


1

admin_url( 'admin-post.php' ) is the non-ajax version of admin_url( 'admin-ajax.php' ) Similar to admin-ajax.php it will fire one of four hooks: Logged out users admin_post_nopriv_{action} ($_REQUEST['action'] specified) admin_post_nopriv (no $_REQUEST['action'] specified) Logged in user admin_post_{action} ($_REQUEST['action'] specified) ...


-1

Use this for admin <div class="updated"><p><strong><?php _e('Total 12 Records Saved.' ); ?></strong> </p></div>


-2

is this page in front-end or within wp-admin? If the latter you can easily use admin_notices for that: admin_notices


0

Way easier: use a WordPress function called wp_login_form() (Codex page here). You can make your own plugin so that you can use a shortcode in on of your pages: <?php /* Plugin Name: WP Login Form Shortcode Description: Use <code>[wp_login_form]</code> to show WordPress' login form. Version: 1.0 Author: WP-Buddy Author URI: ...


0

Please try to replace: update_post_meta( $post_id, 'figure_sugsubject_repeatable_fields', $new ); with: add_post_meta( $post_id, 'figure_sugsubject_repeatable_fields', $new ); to add more values related to the figure_sugsubject_repeatable_fields meta key. You should also consider using filter_input() instead of $_POST.



Top 50 recent answers are included