Results 1 to 4 of 4

Thread: make field not required per category

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default make field not required per category

    I'd like to use one category as a yellow page.
    I already used the hack to make url not required.
    I made some custom fields for first and last names
    Can I make those 2 custom fields required only on a specific category?

  2. #2
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    Default Re: make field not required per category

    In your addlink.php file look for this code:
    PHP Code:
    $thisfield 'field' $field
    Right above it add this:
    PHP Code:
            if (in_array($field, array(A,B,C)) AND !in_array($_POST['catid'], array(X,Y,Z)))
            {
                continue;
            } 
    Replace A,B,C there with the fieldids and X,Y,Z with the catid(s) that those fields should be required in. I haven't tested this, but it should work fine.

  3. #3
    Meow lee wilde's Avatar
    Join Date
    Jun 2004
    Location
    Perth, Australia
    Posts
    47

    Default Re: make field not required per category

    This is cool.

    Can I now make fields which are not required in a certain category, not visible in the "ADV_LINKS_ADD_EDIT" template?

  4. #4
    Administrator Brian's Avatar
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,467

    Default Re: make field not required per category

    Not really since your users will pick the category on that page.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. More than one category.
    By kittymother in forum "How Do I..." Questions
    Replies: 6
    Last Post: 05-03-2008, 01:42 AM
  2. Make URL field not required
    By DougM in forum "How Do I..." Questions
    Replies: 17
    Last Post: 11-25-2005, 02:45 PM
  3. Make a category for a specific group
    By attroll in forum "How Do I..." Questions
    Replies: 2
    Last Post: 10-17-2004, 11:19 PM
  4. Feature Request: Make "User" field editable to Mods
    By ataraxia in forum Feedback & Suggestions
    Replies: 1
    Last Post: 10-06-2004, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •