uCan Post
[resolved] Name and email requirements for posts (3 posts)

  1. babble
    Posted 4 years ago #

    Hello and thank you for your plugin. It is very near to perfect for my site. I am wondering if there is a way that I can disable the requirements to provide a name and an email when a user submits a post? I am trying to use this for a site that where submissions from guests would be anonymous and I don't see any way to eliminate those requirements in the settings for the plugin. Thanks.


  2. cartpauj
    Plugin Author

    Posted 4 years ago #

    find and remove these lines from the ucan-post-class.php file - or downgrade to the previous version.

    if(empty($_POST['ucan_submission_guest_name']) && !$user_ID)
            $errors[] = __('You must enter your name!', 'ucan-post');
          if((empty($_POST['ucan_submission_guest_email']) || !$this->uCan_Validate_Email_Address(stripslashes($_POST['ucan_submission_guest_email']))) && !$user_ID)
            $errors[] = __('You must enter a valid email address!', 'ucan-post');
  3. babble
    Posted 4 years ago #

    Thank you very much for your help. As a follow up, I also noticed that the form fields for name and email on the my guest post submission page were still there after removing the code that cartpauj told me to remove. To remove those form fields, you have to go to the "ucan-submission-form.php" file and either remove or comment out the following lines:

    <?php echo __('Name', 'ucan-post'); ?>:
            <span class="small"><?php echo __('(required - not shown publically)', 'ucan-post'); ?></span>
          <input type="text" name="ucan_submission_guest_name" value="<?php echo stripslashes($_POST['ucan_submission_guest_name']); ?>" />
            <?php echo __('Email', 'ucan-post'); ?>:
            <span class="small"><?php echo __('(required - not shown publically)', 'ucan-post'); ?></span>
          <input type="text" name="ucan_submission_guest_email" value="<?php echo stripslashes($_POST['ucan_submission_guest_email']); ?>" />

    I hope this helps anyone out to achieve the same thing that I was, and thanks again cartpauj for your speedy help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic