Welcome Guest, Not a member yet? Register   Sign In
Why is form_dropdown not named form_select?
#1

Hi,

Simple question. Why is the form_dropdown method not named form_select?

All the available form helper methods that generate a form input are named after the element that they represent. Except for the select element.

What is the reason for this?

- Martin
Reply
#2

Maybe called 'form_dropdown' because the behavior of html select tag. When user click, it dropdown list of choices. ?
Keep calm.
Reply
#3

(This post was last modified: 11-09-2015, 11:33 AM by Martin7483.)

(11-09-2015, 11:27 AM)arma7x Wrote: Maybe called 'form_dropdown' because the behavior of html select tag. When user click, it dropdown list of choices. ?

That is what I was thinking, but it does not match with the rest of the method naming.
I always start typing form_sel... and then get reminded that it's not form_select but form_dropdown. So I have now added an alias to a MY_form_helper.
IMO I think it makes more sence to name it form_select, and not form_dropdown. So maybe an alias should/could be added to the next version?
Reply
#4

Somebody, years ago, liked "dropdown" better than "select".

As much as I wish that everything is done for a reason, that's just not always the case.
Reply
#5

(This post was last modified: 11-09-2015, 06:20 PM by skunkbad.)

PHP Code:
<?php
// MY_form_helper.php
function form_select($data ''$options = array(), $selected = array(), $extra '')
{
  return form_dropdown($data$options$selected$extra);

Reply
#6

(This post was last modified: 11-09-2015, 11:53 PM by Martin7483.)

(11-09-2015, 06:20 PM)skunkbad Wrote:
PHP Code:
<?php
// MY_form_helper.php
function form_select($data ''$options = array(), $selected = array(), $extra '')
{
  return form_dropdown($data$options$selected$extra);


Thanks for that, but I already added that exact piece of code Smile

Quote:So I have now added an alias to MY_form_helper.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB