1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Conditional fields (SC & AMS)

Discussion in 'Showcase Support' started by alfa1, Feb 11, 2015.

  1. alfa1

    alfa1 Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Conditional fields only display if a condition is met. For example:
    If value for field_a = yes, then display field_b

    This is very useful for fields that are only applicable for specific cases.

    This function would also allow us to create one field that allows the user to hide many fields with one click in order to give the user a simpler version of the item / article creation page.

    On my forum there are many power users who enjoy filling in many fields, but there are also many users who are put off by complex pages with many fields. I would like to cater to both. Conditional fields would be great.
     
  2. Bob

    Bob Developer Staff Member

    You can do this already by using self placement fields. That is one of the more powerful uses of the self placement field type. Its a VERY powerful tool. Even tho its an advanced usage (unsupported), its really easy to use once you get the hang of it (Ask @C.Birch )
     
    alfa1 likes this.
  3. alfa1

    alfa1 Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Amazing! Where can I find info about self placement fields?
     
    tajhay likes this.
  4. Bob

    Bob Developer Staff Member

    http://xenaddons.com/threads/how-to-place-showcase-custom-fields-in-templates.499/#post-4178

    All you need to know is the xen syntax for the RAW value to use that as a switch. $item (that is the entire item array) .customfields (that is the entire custom fields array for the item .fieldid (the self place field ID) $item.customfields.myfieldid <--- thats IT you can use that in an IF statement to wrap something making it an ON/OFF switch. That is just one of many uses.
     
  5. C.Birch

    C.Birch Member AMS Premium SC Premium UBS Premium

    Yeps the self placement fields was a god send when they got added, before them i had to use html bbcode to add stuff to a listing, now i just fill a field in on a form whats so much better and neater and lets for normal users to be able to add the same data that before only admin could add due to the having to use html.
     
    Bob likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.