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

Possibility to change "Placeholders" of MYSFormTextFieldElement? #11

Open
code-K opened this issue Mar 17, 2015 · 4 comments
Open

Possibility to change "Placeholders" of MYSFormTextFieldElement? #11

code-K opened this issue Mar 17, 2015 · 4 comments

Comments

@code-K
Copy link

code-K commented Mar 17, 2015

Hi @atomkirk ,

is there some possibility to change the placeholder string of MYSFormTextFieldElement?

Thanks much for feedback and best regards,
C

@atomkirk
Copy link
Member

Try using configureCellBlock

@code-K
Copy link
Author

code-K commented Mar 18, 2015

Hi @atomkirk ,

thanks... I've tested with:

firstNameField = MYSFormTextFieldElement(label: "Vorname", modelKeyPath: kFIELD_FIRSTNAME)
        //firstNameField.theme.textAlignment = "right"
        firstNameField.configureCellBlock { (cell: AnyObject!) -> Void in
            if let cell:MYSFormTextFieldCell = cell as? MYSFormTextFieldCell {
                cell.textField.placeholder = "(Falls, abweichend)"
            }
        }

but this seems to be not working... Am i'm missing something?

Also another question regarding the datePicker when presence validation is added. Did you figure out what's the problem that it never get's valid, even when selected a date??

pickerField.addFormValidation(MYSFormPresenceValidation())

@atomkirk
Copy link
Member

Hmm, I'll have to look at the placeholder problem.

No, i haven't fixed the date picker presence bug, but I will.

@atomkirk
Copy link
Member

ok, so I looked into it, and it's currently not possible to change the placeholder. The reason being because there is no conventional label. The label of the field is displayed as the placeholder and then above the text field once it has text in it. I think this is a more compact and cleaner way display a label with a text field so I'd like to keep it this way. You can always follow the guide in the readme to create a custom subclass that behaves however you want.

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

2 participants