Giter Site home page Giter Site logo

tombreit / wagtail-api-forms Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 491 KB

User friendly html form builder. A customized Django Wagtail app.

License: GNU Affero General Public License v3.0

Dockerfile 2.22% JavaScript 0.80% SCSS 4.81% Python 83.97% HTML 8.20%
form-builder wagtail

wagtail-api-forms's Introduction

wagtail-api-forms

User friendly html form builder. A customized Django Wagtail app.

Wagtail as a standalone builder for form pages or simply forms.

Features

Building upon the feature set of Wagtail form builder and customized to provide the following additional features.

  • Expose API endpoint for forms, authentification via token (optional, configurable per form)
  • Custom form fields:
    • Document file field
    • Image file field
    • Typeahead-Multiselect field ("select2")
    • Datetime and time fields with time picker for Firefox
  • Embed page content - without header, footer etc. - via url?embed=true. Useful for embedding only the form on third party sites.
    • iFrame autoresizing
    • Handles Content Security Policy (CSP). See .env.
  • Multilingual
  • Captcha (optional, configurable per form)
  • Protect uploaded files (images and documents) via
    • filenames prefixed with an UUID
    • files could only be fetched from an authenticated request, and/or a whitelisted IP address
  • Validates incoming files for:
    • maximum file size
    • file extension
    • file mime type
    • virus scan (via clamav in docker, done async via task queue huey)
  • Branding with custom Logos, Favicon, colors etc.

iFrame

<style>
  iframe#waf-iframe {
    width: 1px;
    min-width: 100%;
  }
</style>
<iframe id="waf-iframe" src="https://fqdn.com/wagtail/formpage.html"></iframe>
<script src="https://fqdn/static/dist/js/jquery/jquery.min.js"></script>
<script src="https://fqdn/static/dist/js/iframeresizer/iframeResizer.min.js"></script> 
<script>
  iFrameResize({ log: false }, '#waf-iframe')
</script>

Snippet from https://github.com/davidjbradshaw/iframe-resizer#typical-setup. Thanks to davidjbradshaw

Usage

Setup

See docs/setup.md

Hints

  • Docs are served at the URL fqdn/docs/.
  • Attachment file objects could only be fetched with an authenticated request (from whitelisted ip address or basic auth)
  • Attachment file objects could only be fetched if its status is av_passed=True for which the huey task queue must be running (or when virus checking facility is disabled via FORMBUILDER_USE_ANTIVIR_SERVICE=false in .env)

wagtail-api-forms's People

Contributors

tombreit avatar

Stargazers

Tuan Duc Tran avatar  avatar

Watchers

 avatar

Forkers

cinarteker

wagtail-api-forms's Issues

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.