-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[BUG]: Phalcon\Html\Helper\Input\Select not working correctly #16625
Comments
I might have to rewrite this component. There are a couple of features that are a bit difficult to use to get the result you need. This code should do what you need to do: $this->view->typeOptions = [
4 => 'Type 4',
8 => 'Type 8',
]; <div class="row row-label">
<label>Type:</label>
{% assign select = inputSelect(' ', PHP_EOL, ['name' : 'type', 'placeHolder' : 'Select type']) %}
{% for id, name in typeOptions %}
{{ select.add(name, id) }}
{% endfor %}
{{ select }}
</div> I am thinking, in alignment with what you mention, to have more methods for this. For instance we can have a method I will work on this most likely this weekend. |
Describe the bug
Following this example: https://docs.phalcon.io/5.7/volt/#tag-helpers
It shows you should place
inputSelect
in a loop chained to anadd
function to add options. Not surprisingly, this just spits out x number of select fields, with only one option (see screenshots). So obviously the documentation is wrong here, but reviewing the source, I cannot find a method for adding a list of options directly? (Phalcon 3.4 had ausing
option: https://docs.phalcon.io/3.4/volt/#using-tag-helpers).How to do this in Phalcon 5.7?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
One select field with provided multiple options.
// paste code
Screenshots
If applicable, add screenshots to help explain your problem.
Details
The text was updated successfully, but these errors were encountered: