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.

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

Aufgrund von Feiertagen und Urlaub ist bei Anfragen im Forum in der Zeit vom 20. Dezember 2024 bis zum 8.Januar 2025 mit verlängerten Antwortzeiten zu rechnen.

Logged in users only

Mehr
10 Jahre 3 Monate her #812 von themeindia.org
Logged in users only wurde erstellt von themeindia.org
Hi,
I want my form to show to all so that they know what the form is all about, but they are not allowed to post the messages unless they are logged in. Is that kind of validation already there in the "Submit" button?

Thank you in anticipation

themeindia.org: A not-for-profit online community.

Mehr
10 Jahre 3 Monate her #814 von Administrator AV
Administrator AV antwortete auf Logged in users only
Hi,

sorry but no, that is not possible out of the box.

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 :-).

Mehr
10 Jahre 3 Monate her - 10 Jahre 3 Monate her #816 von themeindia.org
themeindia.org antwortete auf Logged in users only
Hi,
Do you think the code below is enough for that kind of validation ?
Code:
if ( JFactory::getUser()->guest) { echo “Please login to submit.”; } else { // process the submit event }
If yes where exactly should I put them?
Thank you.

P.S. Most of the times I am having trouble logging in this forum. It says 'It seems you are a spammer etc......" and won't allow me to login and sometimes it works just fine.

themeindia.org: A not-for-profit online community.
Letzte Änderung: 10 Jahre 3 Monate her von themeindia.org.

Mehr
10 Jahre 3 Monate her #817 von Administrator AV
Administrator AV antwortete auf Logged in users only
Hi,

first, I use a spam protection software and I can see that your IP, although it seems to change daily, often is listed as a spammer IP at the spambot database of sorbs.net. That is, why your login is blocked. I have set you as a trusted user, so you should no longer be blocked, no matter your IP.

I think your code proposition is ok. The best way to use it would be to create an override of the default form view in your template. (Create a folder html/com_visforms/visforms in your template root folder and copy the default.php from components/com_visforms/views/visforms/tmpl intot it).

Add your code to that copied default.php in the template folder. Almost at the bottom of the default.php (about line 465) you find a div class="visBtnCon, which is closed about line 500. Wrap the whole div in your "else" statement and you have a form without submit button for guest users. So you will not stop the submit event but just don't offer a submit button, so that the form cannot be submitted.

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 :-).

Mehr
10 Jahre 3 Monate her - 10 Jahre 3 Monate her #818 von themeindia.org
themeindia.org antwortete auf Logged in users only
Thank you Aicha,

Yes our ISP provides dynamic IP everytime you login. I have no idea how sorbs.net works but this state owned ISP is one of the largest in the world with 8.09 million subscribers base at the moment.

My form in question is embeded with an article as a module so in my case I created a folder html/mod_visforms/ in my root template folder and copied default.php from modules/mod_visforms/tmpl in it.

Unfortunately that's my exact requirment at the moment, i.e. hold the processing of submit event until the user is logged in. On clicking submit button the user will be warned " You are not logged in" or "Please login to submit" if they are not logged in yet.

Your guidance in this regard will be highly appreciated.

themeindia.org: A not-for-profit online community.
Letzte Änderung: 10 Jahre 3 Monate her von themeindia.org.

Mehr
10 Jahre 3 Monate her - 10 Jahre 3 Monate her #820 von Administrator AV
Administrator AV antwortete auf Logged in users only
Hi,

in the default.php at line 118 ff you find the following code
Code:
var validator = jQuery(document).ready(function() { jQuery('#mod-visform<?php echo $visforms->id; ?>').validate({ wrapper: "p",

Just insert the following lines between the second and the third line (before the "wrapper" - line).
Code:
submitHandler: function(form) { <?php if (JFactory::getUser()->guest) { ?> alert('Please login in submit the form'); <?php } else { ?> form.submit(); <?php } ?> },

The only drawback in my opion is, that the submitHandler is executed after the validator. So the user will fill in the form, correct all there invalid inputs, try to submit and gets the message to login first. After the login the form controls are empty again, so they have to enter the values again.

But maybe you can improve that solution by reading a bit more about the jQuery validator plugin.

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 :-).
Letzte Änderung: 10 Jahre 3 Monate her von Administrator AV. Begründung: Misspelling corrected

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum