deck9 / input

A privacy-focused, no-code, open-source form builder designed for simplicity and brand consistency.
https://getinput.co
GNU Affero General Public License v3.0
190 stars 30 forks source link

Adds new logic for block and interaction types #3

Closed PhilReinking closed 2 years ago

PhilReinking commented 2 years ago

This PR solves #2 and should also fix #1.

New logic structure for blocks and interactions.

Blocks have now more information on the input because the types got more specific. Blocks can now be of the following types:

Corresponding to the new block types, there are new interaction types, that can be applied to different block types:

For the input interaction, the new setup removes the need to have additional option fields, like has_validation on the interaction data entry itself, because the type of the block contains the logic implicitly.

Examples

Before:

Block of type input has one interaction with type input with has_validation set to email.

After:

Block of type email has one interaction with type input

What else?

Interactions with type input still can have other fields assigned, like the label, which is used as a placeholder in the case of the input.