- Posts: 82
- Thank you received: 0
Creating online form with fields filled up with membership details
- bumble
- Topic Author
- Offline
- Premium Member
-
Less
More
4 years 11 months ago #137267
by bumble
Replied by bumble on topic Creating online form with fields filled up with membership details
Hi can please help?
I need to launch the site soon.
Waiting for your soonest reply.
Thank you!
I need to launch the site soon.
Waiting for your soonest reply.
Thank you!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
4 years 11 months ago #137268
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Creating online form with fields filled up with membership details
Your code is not enough. You did not include the original code which I answered on your first message. Here is the full code:
Try that, and let me know if it works
Regards,
Tuan
Code:
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDbo();
$db->setQuery("Select * From #__osmembership_subscribers Where user_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);
$query = $db->getQuery(true)
->select('a.name, b.field_value')
->from('#__osmembership_fields AS a')
->innerJoin('#__osmembership_field_value AS b ON a.id = b.field_id')
->where('b.subscriber_id = ' . $subscriber->id);
$db->setQuery($query);
$fieldValues = $db->loadObjectList('name');
if (isset($fieldValues['test_field_1']))
{
$testField1Value = $fieldValues['test_field_1']->field_value;
}
else
{
$testField1Value = '';
}
if (isset($fieldValues['test_field_2']))
{
$testField2Value = $fieldValues['test_field_2']->field_value;
}
else
{
$testField2Value = '';
}
Try that, and let me know if it works
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- bumble
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 82
- Thank you received: 0
4 years 11 months ago #137269
by bumble
Replied by bumble on topic Creating online form with fields filled up with membership details
The code did not generate any error. But it also didn't display the idnumber. What am I doing wrong? Here is my full code (pls see attached images).
First image shows it in the BreezingForms window, the other is in a code editor. Please reply soon. Thank you!
First image shows it in the BreezingForms window, the other is in a code editor. Please reply soon. Thank you!
- Tuan Pham Ngoc
- Offline
- Administrator
-
4 years 11 months ago #137296
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Creating online form with fields filled up with membership details
Hello
Look like you haven't called ff_setValue to set the received value to your form field?
Something like this should be added to the end:
Could you please try that?
Tuan
Look like you haven't called ff_setValue to set the received value to your form field?
Something like this should be added to the end:
Code:
ff_setValue('idnumber', $idnumberValue);
Could you please try that?
Tuan
Please Log in or Create an account to join the conversation.
- bumble
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 82
- Thank you received: 0
4 years 11 months ago #137301
by bumble
Replied by bumble on topic Creating online form with fields filled up with membership details
Yes it works now!
Thank you!
Thank you!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
4 years 11 months ago #137310
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Creating online form with fields filled up with membership details
Great. Thanks for confirming
Tuan
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.