- Posts: 5
- Thank you received: 0
Questions about Payment Form extension
Menu Item - FORMS LIST
- Michael Deosdade
- Topic Author
- Offline
- New Member
-
Less
More
13 years 1 month ago #13571
by Michael Deosdade
Menu Item - FORMS LIST was created by Michael Deosdade
I want to use the FORMS LIST menu option, but i only want to show certain forms, not my entire list. Is this possible?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
13 years 1 month ago #13588
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Menu Item - FORMS LIST
Hi
It is not possible by default. However, if you can edit the code alitle to make it works. The steps are :
1. Open the file components/com_pmform/models/forms.php
2. Find the code below (At the bottom of file) :
3. Change it to :
Please note that I added line of code $where[] = ' a.id IN (1,2,3,4,5)' ; . Just replace 1,2,3,4,5 with IDs of the forms you wants to show (comma separated) and It will work as expected !
Please let me know if you need more help !
Regards,
Tuan
It is not possible by default. However, if you can edit the code alitle to make it works. The steps are :
1. Open the file components/com_pmform/models/forms.php
2. Find the code below (At the bottom of file) :
Code:
function _buildContentWhere()
{
$where = array() ;
$user = & JFactory::getUser() ;
$where[] = ' a.published = 1 ' ;
$where[] = ' (a.publish_up = "0000-00-00 00:00:00" OR a.publish_up <= NOW())' ;
$where[] = ' (a.publish_down = "0000-00-00 00:00:00" OR a.publish_down >= NOW())' ;
if (version_compare(JVERSION, '1.6.0', 'ge')) {
$where[] = ' a.access IN ('.implode(',', $user->getAuthorisedViewLevels()).')' ;
} else {
$aid = $user->get('aid', 0);
$where[] = ' a.access <= '.$aid ;
}
$where = ( count( $where ) ? ' WHERE '. implode( ' AND ', $where ) : '' );
return $where;
}
3. Change it to :
Code:
function _buildContentWhere()
{
$where = array() ;
$user = & JFactory::getUser() ;
$where[] = ' a.published = 1 ' ;
$where[] = ' (a.publish_up = "0000-00-00 00:00:00" OR a.publish_up <= NOW())' ;
$where[] = ' (a.publish_down = "0000-00-00 00:00:00" OR a.publish_down >= NOW())' ;
if (version_compare(JVERSION, '1.6.0', 'ge')) {
$where[] = ' a.access IN ('.implode(',', $user->getAuthorisedViewLevels()).')' ;
} else {
$aid = $user->get('aid', 0);
$where[] = ' a.access <= '.$aid ;
}
$where[] = ' a.id IN (1,2,3,4,5)' ;
$where = ( count( $where ) ? ' WHERE '. implode( ' AND ', $where ) : '' );
return $where;
}
Please note that I added line of code $where[] = ' a.id IN (1,2,3,4,5)' ; . Just replace 1,2,3,4,5 with IDs of the forms you wants to show (comma separated) and It will work as expected !
Please let me know if you need more help !
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
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.