marcq
Member
Hi,
Hereafter, the explanation of my current issues with the picklist element plugin
I have created two joomla user groups :
1. Patron (skipper)
2. Bacouni (crew member)
Each group can among other forms, access to forms called
1. For the skipper : ?Cahier de service ? Patron?
2. For the crew member : ?Cahier de service ? Bacouni?
which are sharing the same database table.
In each of the form, I?ve got 2 Picklist Elements (in two different groups) :
1. Enable the skippers to enroll to a boat trip as a skipper (list of the registered ?Patrons?)
To enroll they need to login to access to their ?Cahier de service ? Patron?
Only available option of the picklist is the logged in skipper (see the following query/code)
Eval populate skipper Picklist (book_crewchief)
See video : http://www.screencast.com/t/OwNmPrAv
2. Enable the crew members to enroll to a boat trip as a crew member (list of the registered ?Bacounis?)
To enroll they also need to login to access to their ?Cahier de service ? Bacouni?
Only available option of the picklist is the logged in crew member (see the following query/code)
Eval populate crew member Picklist (book_crewmember)
See video : http://www.screencast.com/t/AVM9bgmc2
ISSUE SKIPPER PICKLIST :
See video of the following steps : http://www.screencast.com/t/qJtrabsHfzu
1. ?PATRON 1? enroll as a skipper for a specific boat trip.
2. ?PATRON 2? is looking at the available boat trips and he?s visiting the same boat trip page (form detail view).
He normally should see that the skipper position is already taken by PATRON 1 (in the selected option area of the picklist).
3. ?PATRON 1? should appear in the selected options area of the Picklist, instead of this we can see that it is populated with an empty option :
-> firebug :
<li class="1" id="fab_booking___book_crewchief_value_1"> </li>
The Picklist is not returning the value saved even if the value is stored accordingly in the database.
4. By visiting the same form, with ?PATRON 1? user we can see that his name (option) appears in the selected option area of the picklist, since he enrolled as skipper for this specific boat trip.
ISSUE CREW MEMBER PICKLIST :
Same issue on the crew member?s perspective.
See video : http://www.screencast.com/t/kFys5rCrB
I hope I was clear enough, thank you in advance for your support.
Cheers,
Marc
Hereafter, the explanation of my current issues with the picklist element plugin
I have created two joomla user groups :
1. Patron (skipper)
2. Bacouni (crew member)
Each group can among other forms, access to forms called
1. For the skipper : ?Cahier de service ? Patron?
2. For the crew member : ?Cahier de service ? Bacouni?
which are sharing the same database table.
In each of the form, I?ve got 2 Picklist Elements (in two different groups) :
1. Enable the skippers to enroll to a boat trip as a skipper (list of the registered ?Patrons?)
To enroll they need to login to access to their ?Cahier de service ? Patron?
Only available option of the picklist is the logged in skipper (see the following query/code)
Eval populate skipper Picklist (book_crewchief)
Code:
$dbchief = JFactory::getDbo();
$userid = '{$my->id}';
//Retrieving the id of the logged in skipper
$dbchief->setQuery("SELECT id FROM fab_crew_chief WHERE userid = '$userid'");
$loggedincrewchief = $dbchief->loadResult();
$dbchief->setQuery("SELECT id, nom FROM fab_crew_chief WHERE id = '$loggedincrewchief'");
$myrows = $dbchief->loadObjectList();
foreach ($myrows as $row) {
$options[] = JHTML::_('select.option', $row->id, $row->nom);
}
return $options;
See video : http://www.screencast.com/t/OwNmPrAv
2. Enable the crew members to enroll to a boat trip as a crew member (list of the registered ?Bacounis?)
To enroll they also need to login to access to their ?Cahier de service ? Bacouni?
Only available option of the picklist is the logged in crew member (see the following query/code)
Eval populate crew member Picklist (book_crewmember)
Code:
$dbcrew = JFactory::getDbo();
$userid = '{$my->id}';
//Retrieving the id of the logged in crew member
$dbcrew->setQuery("SELECT id FROM fab_crew WHERE userid = '$userid'");
$loggedincrewmember = $dbcrew->loadResult();
$dbcrew->setQuery("SELECT id, nom FROM fab_crew WHERE id = '$loggedincrewmember'");
$myrows = $dbcrew->loadObjectList();
foreach ($myrows as $row) {
$options[] = JHTML::_('select.option', $row->id, $row->nom);
}
return $options;
See video : http://www.screencast.com/t/AVM9bgmc2
ISSUE SKIPPER PICKLIST :
See video of the following steps : http://www.screencast.com/t/qJtrabsHfzu
1. ?PATRON 1? enroll as a skipper for a specific boat trip.
2. ?PATRON 2? is looking at the available boat trips and he?s visiting the same boat trip page (form detail view).
He normally should see that the skipper position is already taken by PATRON 1 (in the selected option area of the picklist).
3. ?PATRON 1? should appear in the selected options area of the Picklist, instead of this we can see that it is populated with an empty option :
-> firebug :
<li class="1" id="fab_booking___book_crewchief_value_1"> </li>
The Picklist is not returning the value saved even if the value is stored accordingly in the database.
4. By visiting the same form, with ?PATRON 1? user we can see that his name (option) appears in the selected option area of the picklist, since he enrolled as skipper for this specific boat trip.
ISSUE CREW MEMBER PICKLIST :
Same issue on the crew member?s perspective.
See video : http://www.screencast.com/t/kFys5rCrB
I hope I was clear enough, thank you in advance for your support.
Cheers,
Marc