Follow us on
  1. Hey mate... got a question for you...
    For the group field, I see we can modify the accordion title, somewhat...

    Is there a way I can set the accordion title to be the value from the second inner field, or third inner field, or x-number inner field?

    As an example... I've created a group fieldset for some phone numbers. In that, I have 3 fields... type(billing, support, other), name(the persons name), and phone number...

    Right now, the accordion title only ever shows the "type", but I'd like it to show the "name" or "phone number" (or actually... I'd like both to show...)

    Posted 1 year ago #

  2. Codestar
    Admin

    Hi,

    Yes I got the question. That's not possible with current options. But I think it can be possible with some modification. I have to spend some time on this. Let me check what I can do...

    Regards, Codestar

    Posted 1 year ago #
  3. No problems mate

    Posted 1 year ago #

  4. Codestar
    Admin

    Hi,

    I have touched some code today and think it is possible now. Let's make a beta test:
    Download

    Added two new parameters

    // title by
    'accordion_title_by' => array( 'opt-id-1', 'opt-id-2' ),
    'accordion_title_by' => 'opt-id-1', // another usage
    // prefix
    'accordion_title_by_prefix' => ' | ',CopyCopied!

    Usage

    array(
      'id'    => 'opt-group-9',
      'type'  => 'group',
      'title' => 'Group with custom titles',
      'accordion_title_by' => array( 'opt-name', 'opt-phone' ),
      'fields' => array(
        array(
          'id'    => 'opt-name',
          'type'  => 'text',
          'title' => 'Name',
        ),
        array(
          'id'    => 'opt-phone',
          'type'  => 'text',
          'title' => 'Phone',
        ),
        array(
          'id'    => 'opt-textarea',
          'type'  => 'textarea',
          'title' => 'Textarea',
        ),
      ),
    ),CopyCopied!
    array(
      'id'    => 'opt-group-10',
      'type'  => 'group',
      'title' => 'Group with custom titles',
      'accordion_title_by'        => array( 'opt-name', 'opt-phone' ),
      'accordion_title_by_prefix' => ': ',
      'fields' => array(
        array(
          'id'    => 'opt-name',
          'type'  => 'text',
          'title' => 'Name',
        ),
        array(
          'id'    => 'opt-phone',
          'type'  => 'text',
          'title' => 'Phone',
        ),
        array(
          'id'    => 'opt-textarea',
          'type'  => 'textarea',
          'title' => 'Textarea',
        ),
      ),
    ),CopyCopied!

    Regards, Codestar

    Posted 1 year ago #
  5. Works great mate!
    Wondering if this would be useful for a "repeater" field?

    Posted 1 year ago #

  6. Codestar
    Admin

    Hi,

    Nice, Ok I added that feature for next version

    Hmm, I am not sure, If you plan to add 5 items and more, use group. If less than 5 use repeater.

    Regards, Codestar

    Posted 1 year ago #
  7. Hi. Let me start by saying CSF is AWESOME! Easiest way yet to build admin pages. I am successfully using Group->accordion_title_auto->true with the first field being a 'select' field. The accordion title is being set to the selection option's VALUE. Would it be possible to have an option to set the title using the selected option's LABEL or display value?

    I have other questions but they're off-topic so I'll post them separately. Thanks for this AWESOME code. Best $ I've spent in a long time.

    Posted 1 year ago #

  8. Codestar
    Admin

    Hi @wescleveland,

    Welcome to support forum and thanks for purchasing and pretty words.

    Oh Yes, It's possible. Also It should be LABEL for SELECT/CHECKBOX/RADIO. You're right. I noted this and will add the next update You can continue your project, it will come definitely.

    Feel free to ask any questions.
    Regards, Codestar

    Posted 1 year ago #
  9. Yes, I thought of CHECKBOX and RADIO after I posted but you're obviously smart enough to figure them out. One other thought. With CHECKBOX or MULTI-SELECT when more than one choice can be made, perhaps it would be good to have a GLUE option to specify how to join the multiple options together.

    Thanks again.

    Posted 1 year ago #

  10. Codestar
    Admin

    Hi,

    You're welcome.

    Yes right, I have take a look yesterday and thought "multi-select, checkbox, radio" must be works properly That is why I said for the next update. it will take time a little.

    Regards, Codestar

    Posted 1 year ago #