Support » Plugins » [Plugin: Business Directory] remove 'required' fields

  • Hi

    I need to know how I can either stop certain required fields from being displayed or remove the requirement for certain feilds to be completed.

    For instance you have to complete website, phone number or email, but if it has already been entered in to the description I don’t want the information to be displayed again.

    I hope this makes sense!


Viewing 3 replies - 1 through 3 (of 3 total)
  • I think it cannot be set on or off like pluggable. You should modify the code to do this.
    Probably : change in function validateListing($v,$admin = false) in functions.php

    I would like to be able to do this, too.

    I was able to successfully do this by editing /wp-content/plugins/business-directory/function.php

    In line blocks 14 – 32, you’ll have the construction of the form itself. Locate the asterisks for the fields and delete them. This will remove the asterisks from the front-end and the user getting misinformed that a field is required when it indeed will not be.


    Line 777 – 810 will contain the actual validation check statements. Simply comment out the lines that you do not want the script to validate for. Here is an example, where I commented out the “Description” field requirement on Line: 794 – 798:

    		$errors[] = empty($post["description"])?
    			"Please enter a brief description for the organization.<br/>":
    			"Invalid character(s) in $adjective description.<br/>"
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Business Directory] remove 'required' fields’ is closed to new replies.