Giter Club home page Giter Club logo

contao-advanced-form's Introduction

Contao Advanced Form

The contao advanced form bundle adds a new form-field (Formpage) to forms that can be used for multipage-forms with conditions


Working with Contao 4.9 and up to Contao 4.13 (PHP ^7.4 and PHP 8) Cannot be installed together with MP_Forms from Terminal24


Features

  • Configurable formpage / pageswitch form-field with conditions for submitted values
  • A Guest mode to show specific form pages for guests only
  • Does not display form-pages when conditions are not met
  • Sends all collected data on specific form page
  • Compatible with all form-fields from contao

How to install the package

Install the package by using following command:

composer require oveleon/contao-advanced-form

After installing the contao-advanced-form-bundle, you should run a contao install to add the new fields.

The extension cannot be used or installed at the same time as MP_Forms from Terminal24

How does contao advanced form work

Once the installation is complete, you will be able to use a new field type called "Formpage" within Contao Forms that does act as a divider for created form fields (i.e.: radio button menu, textarea, etc.).

The 'formpage' form-field acts as a page-switch and you will be redirected to it if the condition from previous submitted values is met.

Initial setup

  1. Set up your form as usual and create your form-fields

  2. Create 'formpage' fields between the form-fields that should be divided into pages

    Admin View: Advanced form overview

  3. Add a 'submit button label' into your form-page

  4. In case you want a button to get to your previous page, add a 'back button label' as well

Advanced setup for conditions

  1. Follow the initial setup mentioned above

  2. Create values that can be submitted (e.g. Radio button menu) above the form-page that should meet the condition

    Admin View: Advanced form overview

  3. Activate the "Add condition" checkbox and write your condition into it

    Admin View: Advanced form overview

Important Information

Creating Form Pages

  • The first form-page will always be divided by the first form-field and the first 'Formpage'-field.

  • Following form-pages are created by wrapping them with 'Formpage'-fields.

  • The last field in your form needs to be a 'Formpage'-field, otherwise it will show all form-fields (This is great to debug through your form).

Conditions

Conditions within page-switches (Formpages) will always work for the

FOLLOWING

form-fields up to the next page-switch (Formpage)

Syntax

 ${Field name of radio button menu} == '{Value of radio button menu}'

A radio button menu with a field name of 'Example1', and a submitted value of 'Option1' will jump to this page-switch (form-page).

 $Example1 == 'Option1'

You are able to set-up complex conditions to show a certain form-page. The following PHP functions can be used within the condition:

  • floatval
  • strval
  • intval
  • in_array
  • str_contains

If more functionality is needed, feel free to create a feature issue.

Buttons

The submit-button and back-button are set up for the

PREVIOUS

form-page. They will work for the form-fields above the page-switch (Formpage).

Classes

Classes will always be set for the

PREVIOUS

form-page. They will work for the form-fields above the page-switch (Formpage).

Protecting and hiding form-pages

Using the option 'protect form page' and 'show to guests only', will always work for the

PREVIOUS

form-page. They will work for the form-fields above the page-switch (Formpage).

Options

Option Description
Submit button label This field will add a submit button to your form-page that can be named (Next page)
Back button label This field will add a back button to your form-page that can be named (Previous page)
Add condition This checkbox will activate conditions. Your conditions can be written into the text-field
Protect form page Restricts the form page to certain member groups
Show to guests only Hides the form page if a member is logged in

Support

We only provide support for bugs, and feature requests; please only post issues about these two topics.

If you need help implementing Contao Advanced Form or you are just starting out with Contao, please contact us on our website, visit the Contao Community or the Contao Slack, you will be able to find more help there.

This will help us to keep the issues related to this plugin and solve them faster.

License

This project is licensed under the AGPL-3.0 License — check LICENSE for more details.

Sponsoring

If you find this plugin useful, please consider sponsoring us to help contribute to our time invested and to further development of this and other open source projects. Thank you for your support! - Oveleon.

contao-advanced-form's People

Contributors

doishub avatar eki89 avatar zoglo avatar zonky2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

contao-advanced-form's Issues

php 8 kompat.

hallo super form bundle :) allerdings habe ich da eine frage kann man das auch mit php8 nutzen?
danke
grüße

Bedingung mit größer oder kleiner Operatoren

Hallo!
Irgendwie bekomme ich den bedingten Seitenwechsel nicht zum Laufen, wenn ich auf einen Wert mit größer (>) oder kleiner (<) bzw. größer gleich (>=) oder kleiner gleich (<=) prüfe.
Meine Bedingung:
$feldname <= '10'
Resultat beim Seitenwechsel:
"syntax error, unexpected token ";"
Sind solche Vergleichsoperatoren überhaupt möglich?

Form could not be sent: Expected response code 250 but got code "553", with message "553 5.7.1 <[email protected]>: Sender address rejected: not owned by user m041c27a

Beim Versenden einer advanced-form erhalte ich den nachfolgenden Fehler:

Form could not be sent: Expected response code 250 but got code "553", with message "553 5.7.1 [email protected]: Sender address rejected: not owned by user m041c27a

[email protected] habe ich aus Datenschutzgründen geändert.

Die E-Mail-Adresse des Webseiten-Administrators (in der Seitenstruktur) sollte doch eigentlich zum Versenden verwendet werden. Soweit ich das sehe wird jedoch die E-Mail-Adresse des Systemadministrators (in den Contao Einstellungen) zum Versenden verwendet.

Heißt wenn ich in den Einstellungen die gleiche Adresse vom Domaininhaber hinterlege gelingt der Versand ohne Fehler.

Handelt es sich hier evtl. um einen Fehler beim Heranziehen der festgelegten E-Mail in den Contao Einstellungen?

Geschachtelte Abfragen

Hallo, besteht die Möglichkeit, geschachtelte Abfragen einzubauen?

Z. B.: Garagentor 1 oder 2 -> Weiß oder Farbig -> Farbauswahl

$Garagentor == 'Sektionaltor-M' and $Farbauswahl-M == 'Color' leider ohne Funktion

Viele Grüße

Ben

Advanced Forms doesnt show next page/broken?

Hi,

when trying to implement Advanced forms it seems there are some bugs in actual 0.2.2 Version

First it is shown as
Formularseite

FORMULARSEITE :: SCHRITT 1 - NAME

not as defined as "Seitenumbruch".

Second it is not working anymore.

image

is it on website,

image

at backend, also in the html-code there are no findings. Maybe an issue with contao 4.13.4? PHP 8.1 is in use.

If i can provide further information, just tell me :)

thanks in advance.

nicht auswählbar nach Installation!

Hallo,

ich sehe nach der Installation, links nicht das Menü "advanced form" im Backend, wie bei euren screenshots in der doku ?

Contao Ver. 4.9.11 - PHP 7.4

PHP Error

jegliche Version führt zu folgendem Error mit PHP 7.4 und Contao 4.9:

request.CRITICAL: Uncaught PHP Exception Error: "Call to a member function registerFieldsets() on null" at /..../vendor/oveleon/contao-advanced-form/src/Resources/contao/classes/FormPageManager.php line 156 {"exception":"[object] (Error(code: 0): Call to a member function registerFieldsets() on null at /.../vendor/oveleon/contao-advanced-form/src/Resources/contao/classes/FormPageManager.php:156)"} []

LG, Petra

Conflict with contao-haste 5.10

oveleon/contao-advanced-form[0.2.3, ..., 0.2.x-dev] require codefog/contao-haste ~4.25 -> found codefog/contao-haste[4.25.0, ..., 4.x-dev] but these were not loaded, likely because it conflicts with another require

Is there already a timeline for an update with resolves the conflict with "contao-haste 5.10"? I'm relying heavily on terminal42 extensions, which use contao-haste 5.10, but for a specific requirement I desperately need (your) advanced-forms.

Is there anything we can do, to speed up the process?

Feature Request: Autoresponder für advanced_form über Notification Center ermöglichen

Hallo,

wir haben hier einen Fall mit einem 10 seitigen Formular, das umfassende Eingaben aufnimmt. Toll wäre es, wenn diese Eingaben dem Sender als Autoresponder zur Verfügung gestellt werden können.

Ist es vielleicht für die Zukunft möglich, die Benachrichtigungsfunktion des Notification Centers an eure Erweiterung zu koppeln?

Eine Rückmeldung dazu wäre toll.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.