Reload action can reload only one times

How to reload a form element multiple times in ChronoForms.

Overview

The Reload action only works once because it replaces the original element, removing its event listener.
Use an AJAX Call action instead, specifying the page name and a JavaScript function. Then, define that function to update the target field's value with the response.

Answered
ChronoForms v8
Max_admin Max_admin 26 Feb, 2025
Answer
1 Likes

Hi Kittisak

when you reload a new element is inserted, so the reload event will not work because the old field does not exist anymore

you will need to use the AJAX Call, and supply the page name AND a JS function name to call, that JS function will have the response text as a parameter which you can use in the function to set the value of the Text field

This is how it will look like:Reload action can reload only one times image 1

then you need to define the function in JS view:

function set_value(response){
document.querySelector("#text_3").value = response
}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.