Form target

hwsassisi 4d ago

Dear all,

how to set the form target? I can't find any option...In CF7 a Form component was available into the designer, but it seems to me that there's no Form component in CF8.How to set the "_blank" target when I submit a form?

Regards

Max_admin 1d ago
Answer

Hi

Yes, this is not supported, but you can do it using JavaScript on Document Ready.

Inside a JavaScript view:

document.addEventListener("DOMContentLoaded", function () {
	const form = document.querySelector("form.nui");

	if (form) {
		form.setAttribute("target", "_blank");
	}
});
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
hwsassisi 4h ago

Sorry, I can't test your solution because I implemented a different form to solve the issue.

Anyway, why don't you add an option in the "setting" tab to choose the target of the form?

Regards

Max_admin 2h ago

Some browsers have issues with this, so it's not very common.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.