Topic: Activate Ajax on Input Text Field

In FA we can activate Ajax on Combo fields by setting Submit_on_Change to true.

Is there any way we can activate Ajax on Input Text Field if the value is changed then Ajax is called?

www.boxygen.pk

2 (edited by boxygen 05/03/2021 12:10:59 pm)

Re: Activate Ajax on Input Text Field

I have tried to use Jquery to validate some form fields based on input value.
It works fine but when the default FA Ajax is called on the page the jquery doesn't load and hence no validations are done.

I have added this in themes renderer.php menu_header() function.

add_js_ufile("$theme_path/libraries/jquery-1.10.2.min.js");

send_scripts();

Where else I shall add this to ensure that it works even after default Ajax Call on the page?

Please guide.

www.boxygen.pk

Re: Activate Ajax on Input Text Field

For a non-jquery approach, see this commit in my fork.

Re: Activate Ajax on Input Text Field

This is such a great input. I highly recommend to include this in Core

www.boxygen.pk

Re: Activate Ajax on Input Text Field

boxygen wrote:

Is there any way we can activate Ajax on Input Text Field if the value is changed then Ajax is called?

Yes, you can use text_cells_ex helper which has optional submit_on_change parameter.

Braath Waate suggested commit seems to be part of wider code change, so I think it would be easier just to use existing helper option in your customization.

J.