BuddyDev

Search

Allow users to create new Custom Post Type (CPT) entries on profile edit

  • Participant
    Level: Initiated
    Posts: 4
    Alex Abell on #45731

    I love the “Custom Post Type Selector” custom field that you’ve enabled with your BP Xprofile Custom Field Types plugin.

    I’m looking for an option to let the user have a “create new” option (if enabled). This should let them create a CPT entry.

    Is this possible?

    Ex: I am creating a directory for students and corporate hiring managers. I want a field called “Subjects” that includes “Marketing” “Finance” “Accounting” etc.

    If a student is a “Human Resources” major, I want them to be able to add that as a “Subject” post entry.

  • Participant
    Level: Initiated
    Posts: 4
    Alex Abell on #45732

    I noticed that I can do this if I choose “Custom Taxonomy Multiselect” (You have to select that field type and also enable Select2 on the field)

    However, it doesn’t work with “Custom Taxonomy Single Select” or “Custom Post Type” Single/Multiselect.

    Is there a way to add “Other” to the taxonomy and have a new field populate that let’s the user enter a new term?

  • Participant
    Level: Initiated
    Posts: 4
    Alex Abell on #45733

    For now, I hacked a solution that has an other option, preceded by an ASCII dash that makes it show at the bottom of the list. Then I set a condition that displays an “Other Majors” text field that populates only if the Other option is selected.

    It works, but I’d prefer a solution that allows me to choose a default answer, and set sort order of CPT options based on a sort order value (that would be set on each CPT entry) or A-Z.

    See screenshot: https://www.screencast.com/t/rPKqgrj8JEY

  • Participant
    Level: Initiated
    Posts: 4
    Alex Abell on #45734

    Last post from me – for some reason, using your conditional display plugin, when I enter a value in the field that’s displayed when “– Other” is selected on the first field, it clears the value upon saving.

    I had to disable the conditional display and just use a regular multiselect that’s not dynamic.

    Any help on the above use case would be much appreciated.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #45752

    Hi Alex,
    Thank you for the questions.

    At the moment, the custom post type selector is not able to allow creation.

    We allowd taxonomy creation as only one field(Tern Name) is sufficient. The same does not apply to posts. They need title/description and other attributes and not suitable fro creation from xprofile field.

    Since you have hacked a solution for your use case and the conditional field is causing issue with your custom solution, my suggestion will be to disable condition on that specific field.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 4
    Alex Abell on #45776

    I understand. Is there no way to enable taxonomy creation on a single select?

    Also, when Select2 is enabled, the CSS gets thrown off in the Buddyboss 2.0 theme/platform.

    Video: https://www.screencast.com/t/GzmEzlz6hO5t

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #45781

    Hi Alex,
    Thank you.

    I am sorry, that’s the only supported way currently. The problem originates from BuddyBoss applying their custom markup for selects. Please reach out to BuddyBoss support for the ways to disable their custom select markup generation for specific element.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved