- Posts: 88
- Thank you received: 0
Select user field in new subscription form
- Mark
-
Topic Author
- Offline
- Premium Member
-
Less
More
8 years 11 months ago #81921
by Mark
Select user field in new subscription form was created by Mark
The modal dialog created by the "pick a user" field on the new subscription form no longer returns.
Chrome's debug console reports "jQuery is not defined".
I'm guessing, from the lack of noise here (& anywhere else), that you haven't changed Membership Pro for this to make up for a change in the Joomla core (no longer loading jQuery automatically), is that right?
Chrome's debug console reports "jQuery is not defined".
I'm guessing, from the lack of noise here (& anywhere else), that you haven't changed Membership Pro for this to make up for a change in the Joomla core (no longer loading jQuery automatically), is that right?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 11 months ago #81922
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Select user field in new subscription form
Hi Mark
Are you using latest version (2.3.0) of Membership Pro ?
Tuan
Are you using latest version (2.3.0) of Membership Pro ?
Tuan
Please Log in or Create an account to join the conversation.
- Mark
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 88
- Thank you received: 0
8 years 11 months ago #81925
by Mark

Sorry Tuan, I meant to say that. No, I'm on 2.1.0
Replied by Mark on topic Select user field in new subscription form

Sorry Tuan, I meant to say that. No, I'm on 2.1.0
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 11 months ago #81926
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Select user field in new subscription form
Please update to version 2.3.0 and the issue will be gone. Joomla 3.5.0 made some changes to the code, so we had to change code in Membership Pro to make the selection works again (few weeks ago)
Tuan
Tuan
The following user(s) said Thank You: Mark
Please Log in or Create an account to join the conversation.
- Mark
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 88
- Thank you received: 0
8 years 11 months ago - 8 years 11 months ago #81927
by Mark
Replied by Mark on topic Select user field in new subscription form
Will do.
Can you tell me what the change was? I have components of my own that may need changing.
It seems to be that the user field requires jQuery, but doesn't load it, which is surely at best poor practice and at worst a bug. D'you think?
Thx
Mark
Can you tell me what the change was? I have components of my own that may need changing.
It seems to be that the user field requires jQuery, but doesn't load it, which is surely at best poor practice and at worst a bug. D'you think?
Thx
Mark
Last edit: 8 years 11 months ago by Mark.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
8 years 11 months ago #81952
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Select user field in new subscription form
I don't remember exactly. In the older version, we used standard HTML code + some js (based on Joomla user field type mark up if I remember correctly). In the new version, we had to change the method getUserInput in components/com_osmembership/helper/helper.php to use Joomla core JFormField and it works OK
Here is the new code
Regards,
Tuan
Here is the new code
Code:
public static function getUserInput($userId, $subscriberId)
{
$field = JFormHelper::loadFieldType('User');
$element = new SimpleXMLElement('<field />');
$element->addAttribute('name', 'user_id');
$element->addAttribute('class', 'readonly');
if (!$subscriberId)
{
$element->addAttribute('onchange', 'populateSubscriberData();');
}
$field->setup($element, $userId);
return $field->input;
}
Regards,
Tuan
The following user(s) said Thank You: Mark
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.