Git Product home page Git Product logo

nathancox-textfieldgroup's Introduction

SilverStripe TextFieldGroup

This is intended to make any combination of text fields and labels on a single line. Eg for URLSegments prepended by the domain as a label, or for X, Y and Z coordinates for a single location.

The differences from FieldGroup are a) it takes away the minimum width of fields so things are spaced approriately; and b) if you pass in a string instead of a field it's automatically turned in to a LiteralField

No dramatic functionality, just a convenience class for formatting.

Currently being developed on SilverStripe 3, not tested on 2.x yet.

Maintainer Contacts

Requirements

  • SilverStripe 3.0+

Documentation

GitHub

Installation Instructions

  1. Place the files in a directory called tagitfield in the root of your SilverStripe installation
  2. Visit yoursite.com/dev/build to rebuild the database

Usage Overview

The first argument is the field label. All following arguments should be either instances of FormField or strings to be converted in to LiteralFields.

$fields->addFieldToTab('Root.Main', new TextFieldGroup('Map coordinates',
		$this->getMapLink() . '/',
		new NumericField("LocationX", "", "", 3),
		"/",
		new NumericField("LocationY", "", "", 3)
));

$fields->addFieldToTab('Root.Main', new TextFieldGroup('Subdomain',
		'http://',
		new TextField("Subdomain", ""),
		'.example.com'
));

Known Issues

Issue Tracker

nathancox-textfieldgroup's People

Contributors

nathancox 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.