Skip to:
Content
Pages
Categories
Search
Top
Bottom

Is It Possible To Duplicate a Field Group If a Button Or Checkbox Is Pressed?


  • lljb3
    Participant

    @lljb3

    WordPress version: 4.8.1
    BuddyPress version: 2.8.2

    I’m trying to duplicate a set of fields either within a field group or duplicate the field group itself if a user presses a button or clicks a checkbox.

    In this case, the user is setting up their profile and has the fields for the group Company Info entered, yet they have another company name and/or location they want to add to their profile.

    Is it possible to have a button or a conditional checkbox that duplicates an empty set of fields for the group to Company Info 2?

    UX ideal example: Profile > User Fills out Company Info 1 field group > Presses “Add Company” button > Company Info 2 field group is added > User Fills out Company Info 2 > Repeat until desired

Viewing 4 replies - 1 through 4 (of 4 total)

  • lljb3
    Participant

    @lljb3

    Just making sure that follow-up replies are happening.


    evillizard
    Participant

    @evillizard

    i dont know why fields cant be duplicated in buddypress


    dyrasan
    Participant

    @dyrasan

    If you are creating new custom post types then you can just add the same field group to the new post types. Fields can have the same names when used on different post types.

    If I understand what you doing though, I’d probably set up a custom taxonomy of location for the custom post type, then you can create separate lists for each location and only need to add one more template file to your theme “taxonomy-location.php”

    https://codex.wordpress.org/Function_Reference/register_taxonomy

    thanks.


    dyrasan
    Participant

    @dyrasan

    Have you checked above link? Is it useful to you or not?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar