Skip to content

tage5447/tsResetFormPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tsResetFormPro

Introduction

tsResetFormPro is a lightweight JavaScript utility designed to provide a reliable reset mechanism for RSForm Pro forms in Joomla 5/6.


What it does

Solves

  • RSForm reset failure after POST
  • Conditional fields not resetting correctly
  • reCAPTCHA reinitialization issues

Approach

  • Forces GET reload instead of DOM reset
  • Intercepts native reset buttons

Language Support

  • English / Swedish (configurable)

Installation

  1. Copy tsResetFormPro.js to your template or media folder
  2. Include it in your Joomla template or custom script loader
  3. Ensure it loads after your form

Usage

Automatic behavior (recommended)

The script works automatically when using native reset buttons:

<button type="reset">Reset</button>

or

<input type="reset" value="Reset">

In these cases:

  • The script automatically detects RSForm forms
  • Reset buttons are intercepted
  • A safe reset is performed using a forced GET request

✅ No additional configuration or onclick is required


Important

The automatic behavior ONLY applies to elements with:

type="reset"

The following will NOT trigger the script automatically:

<button type="button">Reset</button>
<button>Reset</button> <!-- defaults to type="submit" -->

Note:
<button> defaults to type="submit" if no type is specified.


Manual trigger (optional)

You can manually trigger the reset function when needed:

tsResetFormPro();

Example: custom reset button

<button type="button" onclick="tsResetFormPro()">
    Reset form
</button>

License

MIT License

About

Robust reset handler for RSForm Pro (Joomla 5/6)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors