Joomla 5 Mitteilung

Wir freuen uns mitteilen zu können, dass seit dem 29. Januar 2024 alle unsere Joomla Erweiterungen mit Joomla 5 kompatible sind.

Für alle die gerade noch von Joomla 3 auf 4 aktualisieren: Anleitungen für die Joomla 4 Migration gibt es hier:

Es gibt nun auch eine eigenständige Dokumentation für Visforms für Joomla 4 und für Visforms auf Joomla 5

Forum

Visforms Subscription Inhaber können in unserem Forum Fragen stellen. Bitte mit dem entsprechenden Benutzer anmelden.
Jeder kann lesend auf das Forum zugreifen.

Bitte stellen Sie nur 1 Frage pro Thema.

sort order in visformsdata.php for list/getDetai

Mehr
9 Jahre 11 Monate her #577 von Schuetze
Hi,
i want to sort the output of one visform in frontend.
For the selection i found in visformsdata.php the function getDetail().
I try to add "order by.." but the output is still the same.
I think my practical experience of php/SQL is not very well so i didn't find the mistake.

original:
$query = ' SELECT * FROM #__visforms_'.$this->_id.
' WHERE id = '.$id;

new, test:
$query = ' SELECT * FROM #__visforms_'.$this->_id.' WHERE id = '.$id. ' order by F4 asc';

Could someone please assist?

Thanks a lot

Mehr
9 Jahre 11 Monate her #579 von Administrator AV
Administrator AV antwortete auf sort order in visformsdata.php for list/getDetai
Hi Schuetze,

the getDetail function is the wrong place. It does (as the name says) get the details of one recordset (to display them when you enable the "display details" parameter in form.

If you want to use another field than the "id"-Field as a default to sort the dataview (list) in frontend and you change the components/com_visforms/models/visformsdata.php you will not be able to use more than that one form (because fieldnames are unique in visforms and you have only that one form with the field which you going to write into the php file hard coded).

If that is ok for you try to change the function populateState in the same file.

Replace
Code:
parent::populateState('a.id', 'asc');

with
Code:
parent::populateState('a.F4', 'asc');

(Assuming F4 is the field you want to use) that will solve your problem.

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).
Folgende Benutzer bedankten sich: Schuetze

Mehr
9 Jahre 11 Monate her #580 von Schuetze
Thanks a lot.
You made my day. :-)

Mehr
9 Jahre 11 Monate her #581 von Administrator AV
Administrator AV antwortete auf sort order in visformsdata.php for list/getDetai
You're wellcome!

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Mehr
9 Jahre 1 Monat her #1505 von Algaze

Administrator schrieb: the getDetail function is the wrong place. It does (as the name says) get the details of one recordset (to display them when you enable the "display details" parameter in form.

If you want to use another field than the "id"-Field as a default to sort the dataview (list) in frontend and you change the components/com_visforms/models/visformsdata.php you will not be able to use more than that one form (because fieldnames are unique in visforms and you have only that one form with the field which you going to write into the php file hard coded).
If that is ok for you try to change the function populateState in the same file.
Replace

Code:
parent::populateState('a.id', 'asc');
with
Code:
parent::populateState('a.F4', 'asc');
(Assuming F4 is the field you want to use) that will solve your problem.


I saw this and was hoping to change the sort order of a.id from 'asc' to 'desc' but it looks as if this line is missing from the latest update, version 3.4.0, is there another place to make this change in that version?

Thanks,

Louis

Mehr
9 Jahre 1 Monat her #1510 von Administrator AV
Administrator AV antwortete auf sort order in visformsdata.php for list/getDetai
Hi,

I made this menu item options.
You can now set the sort order field and the sort direction for each menu item (tab: Form Data Display Options)
So no code changes required any more :)

Regards,
Aicha

:idea: I recommend you the new and up-to-date documentation for Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/en/docs/
Most of this also applies retrospectively to Joomla 3.
Please only ask 1 question per topic :-).

:idea: Ich empfehle Dir die neue und aktuelle Dokumentation für Joomla 4:
docs.joomla-5.visforms.vi-solutions.de/docs/
Das meiste gilt rückwirkend auch für Joomla 3.
Bitte immer nur 1 Frage pro Thema stellen :-).

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum