Skip to:
Content
Pages
Categories
Search
Top
Bottom

Dynamic profile fields


  • Henry
    Member

    @henrywright-1

    Has anyone come across a solution to dynamic profile fields?

    For example, I display a profile input field “Qualifications” on the edit profile screen. The field is currently a one line text input. This is great if the member has 1 qualification. What if they have 2 qualifications, or three, or more?

    I’d like the member to be able to click on an “add more” button which creates a new text input which they can use to add a second qualification. Clicking on “add more” again will add a third text input and so on.

    Your thoughts and ideas are appreciated…

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

  • Henry
    Member

    @henrywright-1

    bump


    4ella
    Participant

    @4ella

    nice idea, bump

    @4ella one bump is sufficient!

    @henrywright-1I think this is going to have attendant issues difficult to deal with. Gravity forms allows for forms with repeater fields and you can then tie submissions into existing functionality but profile fields are going to be hard to deal with, if they aren’t created. The repeater fields are created via JS on submission you have to tie it in to creating new profile field label etc then if you can do that you create those extra for all users.

    What may be a better approach is to add in advance all the fields you may need then on front end hide them with JS and allow user to show them as and when needed, public profile would be set to ignore any empty fields & labels.


    Henry
    Member

    @henrywright-1

    @hnla

    Loving the second approach! although not as clean as the first approach, it’ll be much easier to do. jQuery show, hide and toggle could all be used to get the desired effect! i’m going to have a crack at it this weekend…


    Henry
    Member

    @henrywright-1

    @hnla i’ve made a start but have to pop out for a while. You can see where i’ve got to so far

    http://jsfiddle.net/L9U7R/


    paddelboot
    Participant

    @paddelboot

    Another approach might be to “fake” those dynamically created fields. Upon saving them, simply collect all data entered and save it into 1 field. When displaying the profile, extract this data into the according amount of input fields.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Dynamic profile fields’ is closed to new replies.
Skip to toolbar