Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCMSFields: set field max length according to db fields #22

Open
Zauberfisch opened this issue Apr 17, 2014 · 0 comments
Open

getCMSFields: set field max length according to db fields #22

Zauberfisch opened this issue Apr 17, 2014 · 0 comments

Comments

@Zauberfisch
Copy link
Owner

check if we can make the default getCMSFields() loop through all fields and set the max length of text fields to the max length of the DB field

<@simon_w|air> greseky, $field = $this->dbObject('Field'); if ($field instanceof Varchar) $textField->setMaxLength($field->getSize())

use case: a field of type Varchar usually has a max length of 50, which for example can result in a cut of title after saving and confusing the CMS user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant