Joomla 5 Notice

We are pleased to announce that as of January 29, 2024, all of our Joomla extensions are compatible with Joomla 5.

For all who are still updateing from Joomla 3 to Joomla 4: Joomla 4 Migration instructions are available here:

There is now a separate Documentation for Visforms for Joomla 4 and for Visforms for Joomla 5!

Forum

Visforms Subscription user can ask questions in our forum. Please log in with the relevant user first.
Everybody can access the forum for reading.

Please only ask 1 question per topic.

Important information for almost every question:
V1: Which Visforms version is running?
V2: Which Joomla version is running?
V3: Which PHP version is running?

Disabling fields in VisForms Display Data option

More
9 years 1 month ago #2119 by Thinamani
Hi There,

I have added a new field in my form and I would like that field to be locked for editing when the admin clicks on "DisplayData" from the Visforms Forms menu.
Currently the field of IP is locked for editing and I would like to make my field locked as well like the IP field.

Is there a way to achieve this?

Kind Regards

More
9 years 1 month ago #2121 by Administrator AV
Replied by Administrator AV on topic Disabling fields in VisForms Display Data option
Hi,

at the moment it is only possible to allow a user to edit all data in the "displayData" View in the administration panel or to disallow it for all data. When I developed the code which allows you to edit data in backend this was meant to be a very simple feature, which simply allows administrators to correct user input, for example if a user has mistyped their name or addresss...
Using this feature and editing data, requires knowledge about the form, which I expected an administrator would have. As you can see, there is no validation of the inputs an administrator makes and there is no information available for example about what would be a valid input values for select, radios...

During the last two month I developed a Visforms extension, which allows you to enable users (or admins) to edit submitted form data in the frontend. ( vi-solutions.de/en/frontend-data-edit-de...dit-data-in-frontend ) This was a frequently requested feature for Visforms (and it took quite a lot of effort to implement it). The frontend data edit supports ACL down to the field level. In contrast to the display data view in the administration panel, the frontend data edit displays the form once again and uses the user inputs which are stored in the data base as default values. It has full form validation.

I hope this answer will help you.

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

More
9 years 1 month ago #2122 by Thinamani
Replied by Thinamani on topic Disabling fields in VisForms Display Data option
Hi Aicha,

Then how is it possible that the IP Address Field in the "diplayData" view within the administration panel is locked and not editable?

All I want is to pretty much do the same to one more field that I do not want changed by anyone. I am sure that there is a file within the VisForms components that hold the code to lock that field when being displayed.

More
9 years 1 month ago #2124 by Thinamani
Replied by Thinamani on topic Disabling fields in VisForms Display Data option
Hi Aicha,

I had a quick look at the back end coding and found the file named edit.php under administrator/components/com_visforms/views/visdata/tmpl

I made a copy of your original coding and then changed the coding to set the particular field I needed as ReadOnly in the displayData view within the administration panel.

I have emailed you the screen shots of what I have changed and the result in the front end. I have highlighted the coding changes I have made.

Kind Regards

More
9 years 1 month ago #2125 by Administrator AV
Replied by Administrator AV on topic Disabling fields in VisForms Display Data option
Hi,

sorry I was pretty much out of office yesterday. As you have already figured by yourself, I have hard coded for some administrative fields, which should not be editable, that they are readonly just as you did now for your field.

I is a good solution for you to set a field with a specific id to readonly in the same way. And thanks for sharing your solution here.

Please keep in mind, that you will loose your changes with each Visforms update. Maybe you can create a template override of the edit.php file in the administrator template in order to prevent that (I have never check if it is possible to create template overrides in administrator templates but I think it is quite probable, that Joomla! has implemented this feature for administrator templates as well.)

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

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum