Giter VIP home page Giter VIP logo

dynamictextgroup's Introduction

Dynamic Text Group

  • Version: 2.0
  • Author: Brock Petrie
  • Build Date: 2012-10-28
  • Requirements: Symphony 2.2

Description

This field provides a method to dynamically add groups of text fields and text-representable fields (including radio, checkbox and dropdown inputs) to an entry. An example of its use would be for creating tracklists in a section for record albums. This extension would allow you to create as many track entries in each album entry as needed.

Usage

  1. Add the dynamictextgroup folder to your Extensions directory
  2. Make sure Nils Hörrmann's Stage exists in dynamictextgroup/lib/stage
  3. Enable the extension from the Extensions page

Field Editor

The Field Editor in v2 replaces the old custom schema field, and allows for easy manipulation and customization of each field's instance. When adding a new subfield, the label MUST be unique or it'll crash and burn. This is because it names the SQL columns based on your input, and SQL column names must be unique.

To-do

  • Wrap my head around how params could work with this field
  • Add more advanced filtering options
  • Make duplicate field creation impossible.

Change log

Version 2.0

  • Official release.

Version 2.0 dev6

  • 2.0 dev6: allow for bigger schemas in the schema column of the extension's DB table (from varchar(255) to varchar(5000)). manually upped the column length awhile ago in my dev environment and forgot to update the extension.driver.php file.
  • Added 2 new fieldtypes: Checkbox and Radio. Checkbox allows for any amount of checked boxes in the subfield's column; Radio allows for only a single checked radio button in the subfield's column.
  • Fixed validation pattern presets (backslashes weren't being escaped).
  • Minor bugfixes and code improvements.

Version 2.0 dev5

  • Added option to declare validation rules for textfields; added 'number', 'email' and 'URI' pattern presets.
  • Added placeholder attribute to textfields.
  • Minor bugfixes

Version 2.0 dev4

  • Added option to choose between 2 fieldtypes for a subfield: Textfield (default) and Select List. If Select List is chosen, an additional field is displayed that allows for entering the preset options for the select list (entered as comma-separated values; e.g. 'Choice 1, Choice 2, Choice 3, Choice 4').
  • Stylistic changes

Version 2.0 dev3

  • Added basic filtering capability. Accepted filter data is 'handle:value' (e.g. first-name:Brock), where 'handle' is the handle of one of your subfields, and 'value' is the value of said subfield.

Version 2.0 dev2

  • Added option to allow for specific subfields to be required (not left empty).
  • Warn and (sort of) prevent user from trying to save subfields with duplicate labels. Need to make it foolproof, but at least it throws a warning now.
  • Data is now sent and stored as JSON.

Version 2.0 dev1

  • Implemented the Field Editor.

Version 1.0

  • Initial release.

dynamictextgroup's People

Contributors

bauhouse avatar brockpetrie avatar nickdunn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dynamictextgroup's Issues

'Add field' button doesn't work on 2.3.2

As the title suggests, the 'Add field' button doesn't seem to work on 2.3.2. It causes the page to reload, so it;s triggering something, but nothing actually happens.

No console errors before the refresh to report.

This is using the development branch of the extension.

Validation errors

When entering wrong data in a textfield with a validation rule – like number – the field highlights all textfields in that column. I'd expect that it only highlights the ones that actually contain errors.

Error on 2.3.2

SELECT SQL_CACHE e.id, e.section_id, e.author_id, UNIX_TIMESTAMP(e.creation_date) AS creation_date, UNIX_TIMESTAMP(e.modification_date) AS modification_dateFROMsym_entriesASeLEFT OUTER JOINsym_entries_data_93ASed ON (e.id=ed.entry_id) WHERE 1 AND e.section_id= '18' ORDER BYed.value asc LIMIT 0, 1

When trying to navigate to the section with this field.

This is using the development branch of the extension.

Development branch, 2.3?

Hi mate — is the development branch going to be for 2.3 compatibility? I've got a need for this field on a 2.3 project. Should I use the development branch? Apparently you may not need Stage any longer, using duplicator instead?

/cc @nilshoerrmann

Multiple Instance

It seems like it's not possible to edit multiple instances of this field in the section editor. The editor only works for the first field in the list. The other fields just show an empty stage and a Add field button that won't react on click.

schema char limit

You have set the schema row to be a varchar with a limit of 5000 characters but varchar can only ever have 255 chars in MySQL, to my knowledge anyway. If you change it to be a text type instead, then it shouldn't be an issue.

I was creating DTG fields with 4-5 fields within, but because of the varchar restrictions it was cutting off half the schema.

Required field weirdness

Hey Brock, Trying this out on a local install, 2.2.3 and dev branch of extension.

I checked the required field for the extension and whenever I add new text group and click save, it says that my field is Required... but it's not empty, so shouldn't error.

See screen grab of what I see when I try and save: https://dl-web.dropbox.com/get/Public/Screen%20shot%202011-09-17%20at%2012.22.21.png?w=c56465e7

I'm using the select field for manual Yes, No drop down options and a textfield for the entry text.

Unkown Column allow multiple

INSERT INTO sym_fields_dynamictextgroup (field_id, allow_multiple) VALUES ('77', '1')

Getting this error on a 2.3.1 install.

field size weirdness

If you go into the section editor and save it, with or without changes, the widths of the fields within the DTG screw up. The first one becomes a negative value in the hundreds, normally around -900 for me. While the rest become massive positive values, normally all of which are over 1000.

Then when you try and drag them back into place, they don't move.

The only fix is to alter the DB directly.

Oh and this is on your development branch too.

Numeric validation errors on use of Zero "0"

Hi Brock,

Been playing a bit more and discovered that if my field is a required field and I set the validation of a field to numeric, I can't save the section due to "0" not being validated as a number.

Basically, trying to build a Quiz and have all fields with no value have a count of zero. If it's a positive value, all is well.

I'm not too hot on regex so woudln't know where to begin there.

Is this something you've encountered yet?

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.