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.

Wichtige Angaben für fast jede Frage:
V1: Welche Visforms-Version läuft?
V2: Welche Joomla-Version läuft?
V3: Welche PHP-Version läuft?

Redirect URL After Edit Submission

Mehr
1 Woche 1 Tag her #11843 von akshehu
Redirect URL After Edit Submission wurde erstellt von akshehu
Hi..
Visforms Version 5.5.1,
Subscription Version 5.5.1,
Joomla version is 5.3.3
PHP version = 8.2.0


// Question//

Please how can i get or set a URL redirect when i edit a submitted form in front end, ir should redirect to a page (I want).
Currently it only has the redirect setting for "New Submission" , unless if i am missing where it is.?

Looking for your response.
Thank you.

Mehr
1 Woche 33 Minuten her #11853 von Administrator AV
Administrator AV antwortete auf Redirect URL After Edit Submission
Hi,

If the Edit View is accessed via the Visforms data view with an edit link or via Visforms Mysubmissions, Visforms always redirects to the page from which the Edit View was accessed.
There is no setting for specifying a different redirect URL via configuration.

There is the following option to achieve a different behavior:

The prerequisite is that a menu item Visforms data view with an edit link exists.
The Edit View can then be accessed directly via a link.
This link is:
index.php?option=com_visforms&view=edit&layout=edit&task=edit.editdata&id=1&cid=1&return=EncryptedReturnUrl&Itemid=1
id is the form ID
cid is the record ID
Itemid is the menu ID of the Visforms Data View with an edit link menu item
A custom return URL can be set in this link.
The desired return URL must be appropriately encrypted.
The format must conform to the following encoding:
strtr(base64_encode($val), '+/=', '-_,');

Regards,
Aicha
 

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

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

Mehr
6 Tage 14 Stunden her #11854 von akshehu
akshehu antwortete auf Redirect URL After Edit Submission
Thank you for the update.

But what i want is :
Lets assume i already have integration of a plugin with visform where fields are mapped with my plugin.

Now, i want a URL for all submitted forms ( My submissions menu)  when i click on a button from my site it links directly to the particular form and not provide the list of all submissions with edit button. That what i am trying to achieve. is there a way currently to do this?

Thank you

Mehr
6 Tage 7 Stunden her #11856 von Administrator AV
Administrator AV antwortete auf Redirect URL After Edit Submission
Hi,

there is an event 
Code:
onVisformsAfterEditFormSave

with the following parameters
Code:
'subject' => $visform,  'context' => 'com_visforms.form',  'fields' => $fields

which you can retrieve in the event handler
Code:
public function onVisformsAfterEditFormSave(VisformsAfterEditFormSaveEvent $event): void {         // after saving edit form results         // context = 'com_visforms.form'         $context = $event->getContext();         $form = $event->getForm();         $fields = $event->getFields();     }

you could basically use this event handler to redirect to the desired page.

Before you redirect you have to make sure that you clear the user state and check the record in.
Like it is done in the controller code in the components/com_visforms/src/Controller/EditController.php
Which usually runs after all event handlers are processed.

EditController.php (line 307ff)
Code:
$app->setUserState('com_visforms.' . $visform->context , null); $app->setUserState('com_visforms.fieldsdisabledstate.' . $visform->context , null); $adminModel = $this->getModel('Visdata', 'Administrator'); // Table Visdata expects the parameter fid $this->input->set('fid', $visform->id); $adminModel->checkin($this->input->get('cid'));

Make sure, that your plugin with the event handler is the last one in the plugin list.
So that the Visforms event handler for this event are still executed.

Regard,
Aicha

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

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

Mehr
5 Tage 22 Stunden her #11857 von akshehu
akshehu antwortete auf Redirect URL After Edit Submission
Thank you very much for your detailed Explanation.

I will go through it carefully and implement.... Hopefully all goes well.

Thank you once more.

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum