Forums

Focus on text field after load form - Chronoforms V6

rotocal 26 Jun, 2017
Hi everyone,
Does anyone know how to set focus on a field after form load in Chronoforms version 6.
I used in the past for CF V5 following:

<script>
document.forms['form_name'].myfield.focus();
</script>

inside a "Custom Code" section after loading the form.
Max_admin 27 Jun, 2017
Answer
Hi rotocal,

please try the following code:

<script>
document.getElementById("field_id").focus();
</script>


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rotocal 27 Jun, 2017
1 Likes
Max thanks again!!. Works perfectly
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount

{item:title} {images:#}