PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Dynamically populate quantity field based on currently logged in user

  1. This is my situation:

    We will pre register around 12 users using the Restrict Content Pro plugin, so that the form itself is login protected.

    Once the user is logged in, we would like a product quantity field to be dynamically populated with a value that we have determined ahead of time, that will vary per user.

    I'm not sure how to go about this. I can see that we will need to store the quantity values for each user somewhere. Or we will need some sort of if statement along the lines of
    if (user = username) { quantity = number }

    Posted 11 years ago on Thursday February 28, 2013 | Permalink
  2. If you want to tie a quantity to a user, you can use the usermeta table. I'm not sure how you register users with the Restrict Content Pro plugin. If you were using the User Registration add-on, you could store that value as part of their profile in the usermeta table.

    Posted 11 years ago on Monday March 4, 2013 | Permalink