Support

Account

Home Forums General Issues Dynamic Fields & Associated buttons?

Solving

Dynamic Fields & Associated buttons?

  • Hi, so each user on my site owns certain properties (CPTs) and I’d like to give them a list of these properties and associated buttons that do actions based on that specific property.

    For example I want their front-end to show:
    Property One [Button 1] [Button 2]
    Property Two [Button 1] [Button 2]

    Then on the backend I’d like to set Button 1 and button 2 to do a certain action (ex. an api call) but associated to that specific sub-field.

    And the number of fields (and associated buttons) that shows, would correspond the number of fields the user has.

    The fields themselves are easy enough to do with a repeater, but how do I set up these dynamic buttons? Any ideas?

  • You would need to build an AJAX application that submits values to the server where the actions are performed and then possible return results of those actions to the AJAX application.

    A good place to start is here https://codex.wordpress.org/AJAX_in_Plugins

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.