Joomla 5 Notice

We are pleased to announce that as of October 14, 2025, all of our Joomla extensions are compatible with Joomla 6.

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

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

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?

Hidden field populated with Javascript doesn't show data in email

More
2 years 5 months ago - 2 years 5 months ago #9302 by Shaman
Good morning dear devs,

I have a hidden field in my form which I populate with text via JS once the page is loaded.
Now I want to include this field in the submitted form but it stays empty.
The field is filled out and can be read:

Code:
let jobtitlehidden = document.querySelector('[name*="jobtitlehidden"]') let urlhidden = document.querySelector('.jumbotron h1');         if (jobtitlehidden) {                 jobtitlehidden.innerHTML = urlhidden.innerHTML;         }


How to include this field in the email ?
Kind regards,
Claude
Last edit: 2 years 5 months ago by Shaman.

More
2 years 5 months ago #9303 by Administrator IV
Hello Shaman,

here is a link on the subject:
developer.mozilla.org/en-US/docs/Web/HTML/Element/input/hidden

Found as the first entry of a Google search with 'html hidden not sent'.

Citation:
The <input> element's value attribute holds a string that contains the hidden data you want to include when the form is submitted to the server.

I think it will surely help you.

Kind regards, Ingmar

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

More
2 years 5 months ago - 2 years 5 months ago #9304 by Shaman
Thank you Ingmar,

Needed only a litte change, now it works: jobtitlehidden.value = urlhidden.innerHTML;

Thank you again,
Kind regards,
Claude
Last edit: 2 years 5 months ago by Shaman.

Moderators: Administrator AVAdministrator IV
Powered by Kunena Forum