• I am currently evaluation a couple of classified plugins and the deal-breaker for me is having the option to disable the ability for users to input a contact email address when:

    – contacting the listing owner
    – posting a new listing

    Instead, I would want the users email address used when signing up to be used for correspondence.

    Is there a feature that turns off the ability to add any email address to both contacting listing owners and posting a new listing? From your admin demo I cannot see it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    i am afraid we do not have such option in WPAdverts.

    As a workaround, it is possible to automatically prefill the email address in both [adverts_add] and contact form on Ad details pages with the email address saved in user profile (WPAdverts actually does this part by default) and make the email fields in both forms read-only.

    So, while the users will see in both forms that their email will be used in the email field they will not be able to change it.

    Thread Starter tkatsiro

    (@tkatsiro)

    Perfect.

    Plugin Author Greg Winiarski

    (@gwin)

    Ok great, to make the email fields read-only you can add the code below in your theme functions.php file

    
    add_filter( "adverts_form_load", "make_readonly_name_and_email" );
    function make_readonly_name_and_email( $form ) {
      if( $form['name'] != "advert" && $form['name'] != "contact" ) {
        return $form;
      }
      if( is_admin() ) {
        return $form;
      }
      foreach( $form["field"] as $key => $field ) {
        if( in_array($field["name"], array( "message_email", "adverts_email" ) ) ) {
            $form["field"][$key]["attr"] = array( "readonly" => "readonly" );
        }
      }
      return $form;
    }
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Evaluation Questions’ is closed to new replies.