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?

Site Title in hidden field

More
2 years 4 days ago #8587 by Shaman
Site Title in hidden field was created by Shaman
Hello dear devs,

I need to extend the hidden field to include the page title.
How could I achieve this?
I have a working JS solution (below) by replacing the value of a hidden field with the page title but it is not the best solution.
Which file do I have to modify in order to customise the hidden field "Fill field with" options?

(The way to get the title in php is : echo Factory::getApplication()->getMenu()->getActive()->title;)

Thank you for your precious help.
Kind regards,
Claude
Code:
let jobtitle = document.getElementById('jobtitle'); let urlhidden = document.querySelector('[name*="url"]');         if (jobtitle) {             urlhidden.value = jobtitle.innerHTML;         }

More
2 years 3 days ago #8589 by Administrator IV
Replied by Administrator IV on topic Site Title in hidden field
Hello Claude,

Customization by maintaining update-secure overwrites is only possible for layout files of templates.
However, the changes you are asking about are part of the actual Visforms implementation in terms of functionality.
These are in completely different directories.

And also there, it is not just only one file you have to modify in order to customize the hidden field 'Fill field with' options.
Not if you intend to create a new option 'Page title' for fields of type 'hidden' to choose from in the configuration and its implementation.

However, if you still want to make non-update-safe changes to the core of the Visforms implementation at your own risk:

The value for a field of type 'hidden' for the setting 'Fill field with' is set in the following function starting at line 131.
components/com_visforms/lib/field/hidden.php
\VisformsFieldHidden::fillWith

We like the idea and would like to add it to Visforms as a new feature:
2 new options 'Page title' and 'Form title' for the field parameter 'Fill field with'.

I created an issue for this and added it to the development list:
Issue [VF-672] Forum: Field filled with: add options 'page title' and 'form title'.

After a future release that contains this point, you will be informed about it directly here in the topic.

Thanks for your suggestion and greeting, 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 :-).
The following user(s) said Thank You: Shaman

More
2 years 3 days ago #8590 by Shaman
Replied by Shaman on topic Site Title in hidden field
Thank you Ingmar :-)

That's great news to implement this in a future release.
Until then, I modified the core file to my needs :-)
Code:
if ($field->fillwith == 'url') {                 $input = JFactory::getApplication()->input;                 $id = $input->getInt('id');                 $article = JTable::getInstance('content');                 $article->load($id);                 return $article->get('title');                 }

I will remove it when you release the new version.
Thank you again for the great support.

Kind regards,
Claude

More
1 year 5 months ago #9345 by Administrator IV
Replied by Administrator IV on topic Site Title in hidden field
Hi Claude,

the new feature is included in the latest release from 22.05.2023 for Joomla 4:
Visforms 4.3.0
docs.joomla-4.visforms.vi-solutions.de/e...dates/version-4-3-0/
Visforms Subscription 4.3.0
docs.joomla-4.visforms.vi-solutions.de/e...s/sub-version-4-3-0/

Warning: This is a beta release.
It is not available through the Joomla update manager.
The installations have to be done manually and the procedure is described in the documentation.
Installation of the free basic package:
docs.joomla-4.visforms.vi-solutions.de/e...erview-installation/
Subscription installation instructions:
docs.joomla-4.visforms.vi-solutions.de/e...iption/installation/

The new feature is explained in the documentation.
Article title as default value:
docs.joomla-4.visforms.vi-solutions.de/e...tle-as-default-value

Annotation:
Form Title makes no sense at this point and was not implemented.
Placeholders for default values are used so that you can have dynamic content in a field as a default value depending on the specific runtime environment.

The form title is a constant.
For this there is the default value option “Fill field with start value” and then you simply write the form title in the start value option.

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

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum