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.

Disabled attribute for fields

Mehr
1 Jahr 10 Monate her #8915 von Oleg
Disabled attribute for fields wurde erstellt von Oleg
Is it possible to set for fields attribute "disabled"?
I need to set that attribute for checkbox checked as default.

Mehr
1 Jahr 10 Monate her #8922 von Administrator IV
Administrator IV antwortete auf Disabled attribute for fields
Hello Oleg,

Visforms uses the 'disabled' attribute to control the conditional display of fields.
Setting this attribute from outside will almost certainly cause the form to stop working correctly.

Visforms builds a lot of logic on top of this attribute.
This includes, among other things, the display of the form, the validation of the data in the browser and in the server.

The attribute 'disabled' has the function in HTML to force that the value selected for the corresponding field is not sent with the post.
I'm pretty sure you don't want to prevent that.

Quote: I need to set that attribute for checkbox checked as default.
What do you actually want to achieve?
Maybe you want a "readonly"?

Greetings, Ingmar

: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
1 Jahr 10 Monate her #8923 von Oleg
Oleg antwortete auf Disabled attribute for fields
Hello Ingmar,
thank you for your answer.

Quote: Maybe you want a "readonly"?
Yes, the "readonly" meets my requirements, but I don't find this option for checkbox. Is it possible?

Mehr
1 Jahr 10 Monate her - 9 Monate 2 Wochen her #8925 von Administrator IV
Administrator IV antwortete auf Disabled attribute for fields
Hello Oleg,

'readonly' is not supported by the HTML.
In HTML there is no 'readonly' for checkbox, multi-checkbox and select controls.
For slightly different reasons.

Therefore it is not yet supported in Visforms.
However, there is a way for you to still achieve it with very little JavaScript.

You need a script element with very few lines of JavaScript where you display the form.
You can have the script element loaded on top of your form using a site module of type 'custom'.

Create the site module of type 'custom':
Set parameter 'Title' = 'Hide'.
vi-solutions.de/forum-uploads/add-script...rm_module-module.png

Also select a suitable module position there.
The module position must be present where your form appears.
For me this is the case with the template 'Cassiopeia' as follows:
Parameter 'position' = 'banner'.

Add the following script element with the small JavaScript as the content of the module:
Change the fixed value for the field ID '121' to the current value of your checkbox field.
Code:
<script> jQuery(document).ready(function() {     //console.log('called');     jQuery("#field121").click(function() { return false; }); }); </script>

The commented-out line may help to see in the web-browsers development tools if the script gets loaded.

On the 'Menu Assignment' tab, select only the menu you use to display the form:
Set parameter 'Module Assignment' = 'Only on the pages selected'.
vi-solutions.de/forum-uploads/add-script..._module-advanced.png

On the 'Advanced' tab, make sure that only the most necessary HTML is generated (no frames or other DIV elements):
Set parameter 'Module Style' = 'none'.
vi-solutions.de/forum-uploads/add-script...-menu-assignment.png

Your checkbox can then no longer be changed by the user.
However, the value of the checkbox is sent when the form is sent.

Unfortunately, there isn't a section in the documentation yet about what I've described here.
In other words, how a module can be used to load your own JavaScript specifically for a form.
But I think it belongs there.

I have created a development issue for the documentation wish list:
Issue [VF-715] Docu: Add Section: How to add custom HTML script element to a form using a module
If we have expanded the documentation, you will be explicitly informed about it here in the topic.

We want to take a closer look at the 'readonly' again.
Maybe we can integrate your solution into Visforms in general.

However, we cannot yet foresee whether it will not have unexpected and nasty side effects.
There really is a lot of functionality and existing JavaScript code in this area.
So I can't promise it.

I assume that your form doesn't use everything that Visforms offers.
So it should work for you without any problems.

I have created a development issue for the feature wish list:
Issue [VF-714] Forum: Checkbox: Show like 'readonly' but without disabling it
When we release the new feature, you will be explicitly informed about the release here in the topic.

Thank you again for your contribution!

Kind regards, Ingmar

: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: 9 Monate 2 Wochen her von Administrator IV.

Mehr
1 Jahr 10 Monate her #8928 von Oleg
Oleg antwortete auf Disabled attribute for fields
Hello Ingmar,
thank you for your detailed answer with interesting solution!

Mehr
1 Jahr 9 Monate her #8954 von mojweb
mojweb antwortete auf Disabled attribute for fields
+1 for read only on select fields.

Moderatoren: Administrator AVAdministrator IV
Powered by Kunena Forum