TOPIC:

Integration with Joomdonation Membership Pro 2 weeks 1 day ago #245912

  • Topic Author
  • bumbies
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
Can I check if your forms can pull information from Joomdonation Membership Pro?

The developer asked me to let you know to look at data from #__osmembership_subscribers table and you should know what to do.

The aim is to create an online form with fields from a member's profile and other fields.

Please let me know. Thank you!

Please Log in or Create an account to join the conversation.

Integration with Joomdonation Membership Pro 2 weeks 1 day ago #245928

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
Hi,

sure, can you please let me know what columns of this table you need to pull and what type of form fields you need to populate this with? I also need to know if you need all members in a list for example or the data of the user filling out the form?

Details ;)

Regards,
Markus

Please Log in or Create an account to join the conversation.

Integration with Joomdonation Membership Pro 2 weeks 1 day ago #245975

  • Topic Author
  • bumbies
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
Great! I will need fields like first name, last name, membership ID and 2 more custom fields declared in Membership Pro.

So when the member is logged in & loads this form, it will be auto-filled with the member’s details (can set to non-editable?), he then fills in another few form fields and submits.

Please let me how to get this done. Thanks!

Please Log in or Create an account to join the conversation.

Integration with Joomdonation Membership Pro 2 weeks 19 hours ago #246020

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
Hi,

what I mean was the exactl column names of the subscriber table because they are relevant for my example below, so you will basically need to replace it with the ones I am using with the $subscriber variable. So basically please read the comments in the example.

In form => advanced => more options => form pieces => before form => check custom. There you would put "something" like this
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDbo();
$db->setQuery("Select * From #__osmembership_subscribers Where userid = " . $db->quote(JFactory::getUser()->get('id'))); // replace userid with the column name for the actual user id
$subscriber = $db->loadObject();

//preset the elements in the form
ff_setValue('last_name', $subscriber->last_name); // replace last_name with the table column name
ff_setValue('first_name', $subscriber->first_name); // replace first_name with the table column name
ff_setValue('membership_id', $subscriber->id);  // replace id with the table column name for the id
// and so on

So if you have the 3 fields last_name, first_name and membership_id as readonly textfields, you will see these getting populated upon form load.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Last edit: Post by TheMuffinMan.

Integration with Joomdonation Membership Pro 1 week 22 hours ago #246374

  • Topic Author
  • bumbies
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 28
  • Thanks: 0
Thank you, but I am unable to get it to work.

These are the column names of the fields I will need:
first_name
last_name
membership_id

My code:
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDbo();
$db->setQuery("Select * From #__osmembership_subscribers Where membership_id = " . $db->quote(JFactory::getUser()->get('id')));
$subscriber = $db->loadObject();

ff_setValue('last_name', $subscriber->last_name);
ff_setValue('first_name', $subscriber->first_name);
ff_setValue('membership_id', $subscriber->membership_id);

Please Log in or Create an account to join the conversation.

Integration with Joomdonation Membership Pro 1 week 21 hours ago #246379

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 644
  • Karma: 3
  • Thanks: 75
Hi,

make sure that you set correct name of element for (last_name, first_name, and memebership_id)
Example:
.....
ff_setValue('nameofelementforlastname', $subscriber->last_name);
ff_setValue('nameofelementforfirstname', $subscriber->first_name);
ff_setValue('nameofelementformemebershipid', $subscriber->membership_id);
Replace
-'nameofelementforlastname' with name of element for last name(not title).
-'nameofelementforfirstname' with name of element for first name(not title).
-'nameofelementformemebershipid'with name of element for membership_id(not title)

Let me know if it is ok for you now.

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.
Moderators: ForumSupport
Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!