PHPackages                             hypejunction/elgg-ajax-form - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hypejunction/elgg-ajax-form

ActiveElgg-plugin[Utility &amp; Helpers](/categories/utility)

hypejunction/elgg-ajax-form
===========================

Handling form submissions with promises

1.0.0(6y ago)013GPL-2.0JavaScriptPHP &gt;=7.0

Since Aug 1Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hypeJunction/elgg-ajax-form)[ Packagist](https://packagist.org/packages/hypejunction/elgg-ajax-form)[ Docs](http://hypejunction.com)[ RSS](/packages/hypejunction-elgg-ajax-form/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Elgg Ajax Form
==============

[](#elgg-ajax-form)

[![Elgg 2.3](https://camo.githubusercontent.com/cfd1f9530e267f480ce207ec10333e3a5ffc64bd5e292306d6431ec406aee1d4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d322e332e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/cfd1f9530e267f480ce207ec10333e3a5ffc64bd5e292306d6431ec406aee1d4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d322e332e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)

Dealing with form submission using jQuery is hell, especially when you have to bind multiple handlers that depend on each other. This plugin provides a module that can be used to queue promise-based handlers.

```
var Form = require('ajax/Form');
var form = new Form('.my-form');
var Ajax = require('elgg/Ajax');

form.onSubmit(function(resolve, reject) {
	// execute a long running script, e.g. validate fields via ajax
	var ajax = new Ajax();
	ajax.post('somewhere').done(resolve).fail(reject);
})

form.onSubmit(function(resolve, reject) {
	console.log('hello');
	resolve();
});

// By default, once all promises are resolved, the form will be submitted via ajax,
// and the user will be forwarded to the URL specified by the response
// You can however register custom success callbacks to prevent redirection

form.onSuccess(function(data) {
	console.log(data);

	require('elgg/lightbox', function(lightbox) {
		lightbox.close();
	});

	$('.my-list').refresh();
});

// You can also add your own error handler

form.onError(function(error) {
	console.log(error);
});
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5071b1cd852e094b3f564962a625e04c227adc73af30c5b46b243ab8f20154a7?d=identicon)[hypeJunction](/maintainers/hypeJunction)

---

Top Contributors

[![hypeJunction](https://avatars.githubusercontent.com/u/1202761?v=4)](https://github.com/hypeJunction "hypeJunction (2 commits)")

---

Tags

pluginelggForms

### Embed Badge

![Health badge](/badges/hypejunction-elgg-ajax-form/health.svg)

```
[![Health](https://phpackages.com/badges/hypejunction-elgg-ajax-form/health.svg)](https://phpackages.com/packages/hypejunction-elgg-ajax-form)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
