Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Conversation

@jeffleeismyhero
Copy link
Collaborator

This PR adds support for Toggle fields as requested in #474, #476 and referenced in #536 and #544.

The field supports styling for tint and background colors. You can also set the default value using: 0, false, 1, true

{
  "id":"toggle1",
  "title":"Toggle Switch",
  "type":"toggle",
  "value":true,
  "size":{
    "width":50
  },
  "styles":{
    "tint_color":"#3DAFEB",
    "background_color":"#FFFFFF"
  }
}

screen shot 2016-11-12 at 1 31 50 pm

@3lvis
Copy link
Owner

3lvis commented Nov 12, 2016

Hi @jeffleeismyhero,

This is a great addition! Damn, you're on fire!

I only have one feedback. I think this should be switch instead of toggle. If you look around most implementations of toggle mean something different.

@jeffleeismyhero
Copy link
Collaborator Author

I was originally going to use "switch" but ran into a conflict since
"switch" is a reserved word.

On Saturday, November 12, 2016, Elvis Nuñez [email protected]
wrote:

Hi @jeffleeismyhero https://github.com/jeffleeismyhero,

This is a great addition! Damn, you're on fire!

I only have one feedback. Should be switch instead of "toggle". If you
look around most implementations of "toggle" mean something different.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hyperoslo/Form/pull/555#issuecomment-260156106, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AACrzCJlDzWcFYny1sghZG-QUKYCNk-Wks5q9k5ygaJpZM4KwgUG
.

@3lvis
Copy link
Owner

3lvis commented Nov 14, 2016

Let's just ship it.

@3lvis 3lvis merged commit c0feb1e into master Nov 14, 2016
@3lvis 3lvis deleted the switch_field branch November 14, 2016 19:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants