• Resolved rhysparry88

    (@rhysparry88)


    Hi there

    Basically I have a macronutrition calculator where it shows a daily allowance section with the fats, carbs, kcal and protein number input boxes and then it does a calculation based on other boxes I have and works out how many macros they have left.

    Is there a way of basically showing the latest macros they have left on another page/post within my WordPress site or even display it with in the form itself at the top but specifically for the user who is logged in as it’s a members only website using paid memberships pro plugin.

    I have tried to use ACF to add these fields in etc to no avail.

    Please help with any solutions you may have and if getting the pro version will help solve this issue.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Imran – WPMU DEV Support

    (@wpmudev-support9)

    Hi @rhysparry88,

    Thank you for contacting us.

    In your calculation result, you can include this in an inline message for after the user has submitted using the form data option: https://snipboard.io/iWyqMQ.jpg

    In the email notifications, you can also create a custom message where it can include this information and have it sent to the user filling out the form. A PDF report can be created as well and have them download it.

    Another option would be to test out using our API(Requires dev knowledge) where you can grab the entry value: https://premium.wpmudev.org/docs/api-plugin-development/forminator-api-docs/#method-get_entry

    Best,
    Jonathan S

    Thread Starter rhysparry88

    (@rhysparry88)

    Hi Jonathan

    Thank you for your message and information much appreciated.

    I guess I want to go down the API route more as basically what I have done is create extra user profile fields for users of my WordPress site which are basically four macros and named the same as what I have on my form.

    What I want to now do is on form submission update these new custom fields as you could say with the data from the four fields in my form to these fields.

    I then basically want to reference these four extra user fields (which have now been updated from the form submission) on four custom fields or input fields on my form.

    The reasoning behind this is so that the user who is logged in can view their current macro data on the form before continuing with the other fields on there.

    I hope this makes sense. Thanks

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @rhysparry88

    Yes, this makes sense and thank you for the explanation!

    I’m afraid, however, that such a setup with Forminator will require quite a bit of cusotm coding as Forminator does not support “profile editing” out of the box. It can provide registration forms but that’s, well, a registration only – and not editing of any user data for already registered users.

    So that would indeed require to be coded, using Forminator API (as my colleague already provided a link to docs) but I’m afraid it goes way to far into custom development area for us to provide “ready to use” solution.

    The first thing would be to actually add your fields to the form and you could use this code as a base for further modification, I believe:

    https://gist.github.com/wpmudev-sls/6a82e5b086d3bbda8006ef36d2907df6

    It is meant to let you add custom/additional fields to the existing form “on the fly” so you could enhance it to pre-populate these fields with the data fetched from your ACF fields.

    But then you’d also need entire part of updating these fields/user profile upon submission and while it should be doable with a custom code I’m afraid you would have to build this up from scratch as I don’t really have any examples and/or code to start with.

    Kind regards,
    Adam

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @rhysparry88 ,

    We haven’t heard from you for some time now, so it looks like you have no more questions for us.

    Please feel free to re-open this ticket if needed.

    kind regards,
    Kasia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Showing form data’ is closed to new replies.