Form Generation Library |
[eluser]seanloving[/eluser]
You never need to call ->validate() because ->get() calls it automatically. is this correct? SL
[eluser]Maglok[/eluser]
@poster: Correct. Question myself: I have an array like this: Code: $config['systeem'] = array( 'something' => 'Something old', Fictional values. I then use the library like so: Code: ->select('categorie', $categorieen, 'Categorie', '', 'required') Which generates this: Code: <label for="categorie" class="right required">Categorie*</label><select name="categorie[]" id="categorie"> Basically, why are the values not the ones I assigned? If I "$bericht['categorie'] = $input['categorie'][0];" then I get 0, 1 or 2 and not 'something', 'old' or 'blue'.
[eluser]macigniter[/eluser]
[quote author="Maglok" date="1278336232"] Code: $config['systeem'] = array( 'something' => 'Something old', Fictional values. I then use the library like so: Code: ->select('categorie', $categorieen, 'Categorie', '', 'required') You're not assigning $config['systeem'], you're assigning $categorieen. Or is that just a typo in your example?
[eluser]Maglok[/eluser]
Í forgot to list another step I do: Code: $categorieen = $this->config->item('systeem'); Since I add another option.
[eluser]macigniter[/eluser]
[quote author="Mustafa Kahraman" date="1278338156"]@macigniter nice too hear from you Is it right fix split fix[/quote] Hi there! Is that a Form Generation Library issue or a general question for your code since split() isn't used in the latest version of the library... In certain cases you can substitue split() with explode(), but not if you use a regular expression pattern. But you're fine if you're just using it to do something like explode(';', $text);
[eluser]macigniter[/eluser]
[quote author="Maglok" date="1278337729"]Í forgot to list another step I do: Code: $categorieen = $this->config->item('systeem'); Since I add another option.[/quote] I just tested this and it worked perfectly with the demo. There must be an error in your code somewhere...
[eluser]Maglok[/eluser]
Alright here we go, more complete: Code: /***** I honestly tried, but it will not return the proper key value, but instead generate with 0,1,2
[eluser]macigniter[/eluser]
Looks like this is related to the sort() function which will most probably re-index your values with numeric keys... |
Welcome Guest, Not a member yet? Register Sign In |