checkField not working and html5 field types like email missing

checkField implementation seems to be incomplete I'ts not possible to check, getPost and store value (complete roundtrip is not working) or am i missing something?

All demo projects are not including the checkfield usage.

Also, the comments in code makes no sense, why put "size=30" near a checkbox (or radiobutton)

Continuing ...there is no option for type="email" or other html5 types?



81.1k

Where size=30 was placed? Can you contextualize your question please?

You can create the helpers you need following this: http://docs.phalconphp.com/en/latest/reference/tags.html#creating-your-own-helpers



5.7k

http://docs.phalconphp.com/en/latest/api/Phalcon%5Tag.html states: echo Phalcon\Tag::checkField(array("name", "size" => 30))

About the checkField implementation

template: checkField(array('test', "value" => "1")) controller: displayTo("test", "1")

won't result in a "checked" checkbox, but will return a getPost("test") == "1"

template: checkField(array('test')) controller: displayTo("test", "true") // only a true string works!

will result in a "checked" checkbox, but does not return any getPost("test") value

but now I see i missed a hasPost value, maybe this will work.. I haven't tried yet

and thanks for the creating own helpers link, I overlooked this feature.



81.1k

It's just a typo in the docs, maybe a wrong copy-paste... I'm going to fix it



81.1k

Can you check the checkField problem with 1.0.1?



5.7k

when the 1.0.1 dll is released i'll give it a try

@lewishop We are also working on a more generic tag that would allow you to create any kind of html tags inclusive of HTML5 ones. This will be in 1.0.1 as soon as we have all the tests passing on this.

@lewishop in the 1.1.0 branch we have a new function for Phalcon\Tag called tagHtml. It is a generic html element generator which allows you to generate any element (valid or not) with its properties etc.