Download the PHP package onedrop/ajaxform without Composer

On this page you can find all versions of the php package onedrop/ajaxform. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ajaxform

Onedrop.AjaxForm

This package provides an additional form element which can be used as a replacement of Neos.NodeTypes:Form to serve every form asynchronously via javascript.

It's built according to the principle of progressive enhancement and will fallback to the default behavior of the Form element.

This is especially useful if you serve your form inside a modal dialog or an accordion and the regular form causes a page reload which makes the confirmation message invisible to your user.

This package adds additional javascript to the end of the body of every page which provides the functionality.

This javascript does not require jQuery, it's plain vanilla.

Compatibility

Neos Version Onedrop.AjaxForm Version
Neos 3.x/4.x/5.x 3.x
Neos 2.3 LTS 2.x

How-To:

Install:

Use the command composer require onedrop/ajaxform to add this package as a requirement to your Neos project.
(Or: Download the zip and unpack it to Packages/Application/Onedrop.AjaxForm)

Routes.yaml:

It's no longer necessary to modify any Routes.yaml as it's deprecated. The additional Ajax-routes are now included via Settings.yaml.

Usage:

Fusion:

You can use the Onedrop.AjaxForm:Form Fusion object as a replacement for the regular Neos.NodeTypes:Form element e.g.

Content element:

This package provides a content element 'Ajax Form' which you can use as replacement for the regular 'Form' content element.
The easiest way is just to select your existing form element and change it's type in the settings tab of the selected content element to 'Ajax Form'.

JavaScript:

The form submission is handled via vanilla javascript.
This package automatically appends the necessary script to the end of the body of every Neos.Neos:Page where a form is placed.

If you use Grunt, Gulp or any other build system, you probably don't want this extra script, but include it in your build process, than you can remove this inclusion by changing the setting Settings.yaml:

JS Events

You can use 2 events to register you event listens.

Before Send Ajax Form Onedrop.AjaxForm:before

After render Ajax Form to HTML Onedrop.AjaxForm:after

Form reload

As the content of your form is being replaced by the confirmation message you usually want the form to reset after the user has seen the confirmation (so that the form can be submitted a second time).

If you place an attribute data-reset-form="1" inside the confirmation message, the form is being resetted after 5 seconds.

E.g. myform.yaml

finishers:
  -
    identifier: 'Neos.Form:Confirmation'
    options:
      message: |
              <div class="callback-success" data-reset-form="1">
                  <h4>Thank you for your request</h4>
                  We will contact you asap.
              </div>

Use javascript out of context

The JS is also shaped for general purpose, you can wrap any form in a div to configure the form to be served over ajax. You must have a controller URL that only serves the HTML for the form you want to ajaxify.


All versions of ajaxform with dependencies

PHP Build Version
Package Version
Requires neos/neos Version ~3.0 || ^4.0 || ^5.0 || ^7.0 || ^8.0
neos/nodetypes-form Version ~3.0 || ^4.0 || ^5.0 || ^7.0 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package onedrop/ajaxform contains the following files

Loading the files please wait ....