Code Monkey home page Code Monkey logo

wp-swift-form-builder-3's Introduction

Customising the Form

Settings

  1. Go to the Settings page (submenu in Forms top level menu).

  2. Click the Disable JavaScript and Disable CSS checkboxes.

Add Files to Theme

├── public
│   ├── sass
│   │   └── wp-swift-form-builder-public.scss
│   ├── css
│   │   └── wp-swift-form-builder-public.css
│   ├── fonts
│   │   ├── icomoon.eot
│   │   ├── icomoon.svg
│   │   ├── icomoon.ttf
│   │   └── icomoon.woff
│   ├── js
│   │   ├── wp-swift-form-builder-public.js
  1. Copy the sass file from public/sass/wp-swift-form-builder-public.scss into your own theme and add it using an @import statement in your main sass file.

  2. Copy the JavaScript file from public/js/wp-swift-form-builder-public.js into your own theme and import using webpack (or whatever way you want to include it).

  3. Copy the fonts directory public/fonts/ into the same folder as your that contain your CSS folder.

assets
└── scss
    ├── _form.scss
├── css
│   └── app.css
├── fonts
│   ├── icomoon.eot
│   ├── icomoon.svg
│   ├── icomoon.ttf
│   └── icomoon.woff
└── js
    └── app.js

Customise

You can now customise the how you wish.

##Sass Snippets

Some useful sass snippets to add to your custom style.

Keep labels and inputs in the same row.
div.form-group {
	@extend .grid-x;
	.form-label {
		@extend .cell;
		@extend .small-12;
		@extend .medium-3;
	}
	.form-input {
		@extend .cell;
		@extend .small-12;
		@extend .medium-10;
	}	
}
div.form-group.button-group, div.form-group.section-content, div.form-group#captcha-wrapper {
	.form-input {
		@extend .small-12;
		@extend .medium-offset-3;
	}		
}
Position Google Recaptcha next to Submit button
/**
 * Position Google Recaptcha next to Submit button
 */
#form-submission-wrapper {
    padding-top: 1rem;
}  
#submit-request-form {
    @extend .expanded;
}
div.form-builder .form-group.button-group {
    .form-input{
        width: 100%;
    }    
}
@media screen and #{breakpoint(large)} {
    #captcha-wrapper {
        padding-top: 0.5rem;
        padding-right: 1rem;
        float: left;
        padding-right: 0.5rem;
    }
    .form-group.mail-receipt {
        padding-bottom: 0;
    } 
    div.form-builder .form-group.button-group {
        padding-left: 0;   
    }  
}

Date picker

Install via Bower or NPM
bower install foundation-datepicker

npm install foundation-datepicker

Sass

// Libraries
@import "../../../node_modules/foundation-datepicker/css/foundation-datepicker.min";

JavaScript

// Installed via NPM
import '../../../node_modules/foundation-datepicker/js/foundation-datepicker.min';

wp-swift-form-builder-3's People

Contributors

garyswift avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.