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

Radio element in Phalcon/Element #1646

Closed
kztime opened this issue Dec 6, 2013 · 9 comments
Closed

Radio element in Phalcon/Element #1646

kztime opened this issue Dec 6, 2013 · 9 comments

Comments

@kztime
Copy link

kztime commented Dec 6, 2013

whether it is possible to create an element the form type of radio?

@ghost
Copy link

ghost commented Dec 10, 2013

echo \Phalcon\Tag::radioField(array('test', 'value' => 1, 'checked' => 'checked'));

@kztime
Copy link
Author

kztime commented Dec 10, 2013

No, I want to create a radio element in the form.
etc.

$form = new Form();

$radio = new Radio('radio-element', ['class' => 'robot']);

$form->add($radio);

but Phalcon\Element doesn't have Radio class for create input element with type radio...

@chiefGui
Copy link
Contributor

I'm confused because what sjinks posted creates a radio element as you need.

@kztime
Copy link
Author

kztime commented Dec 11, 2013

ok, how i can add validators for element, which sjinks recomended?

@moderndeveloperllc
Copy link

The solution from @sjinks is used in the view. Some of us like to extend the Form class and do all the logic there and only the display in the view. Specifically, there are no cphalcon/ext/forms/element/radio.c or cphalcon/ext/forms/element/radio.h files that would allow you to:

use Phalcon\Forms\Element\Radio;

@kztime
Copy link
Author

kztime commented Dec 11, 2013

yea, i extend Phalcon\Forms\Element for create Radio element. Reason for creating the question is to know whether there are other solutions by phalcon

@moderndeveloperllc
Copy link

Awesome, thanks. Now to just wait till 1.3.0 comes out 👍

@phalcon phalcon closed this as completed Dec 19, 2013
@ogarbe
Copy link
Contributor

ogarbe commented Mar 11, 2014

When this version is coming ?

@kztime
Copy link
Author

kztime commented Mar 11, 2014

#2066

ogarbe pushed a commit to ogarbe/incubator that referenced this issue Mar 11, 2014
Fenikkusu pushed a commit to twistersfury/incubator that referenced this issue Dec 23, 2016
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

5 participants