|
|
 Dragos - 2010-06-25 19:50:14 - In reply to message 10 from Gergely Aradszki
still me again :P why if i have something like this:
<p>
<input type="hidden" name="action" value="delete" />
<input type="submit" value="Yes, delete this user" />
<input type="submit" name="action::list" value="No, keep this user" />
do you thing is better to have a function to render the submit button, it's just an ideea now i quiqly make myself one, but if you think like it is an improvement maybe you implement this.
 Gergely Aradszki - 2010-06-25 20:33:13 - In reply to message 11 from Dragos
I made a function that makes it possible to add custom item (yes, not yet implemented things too) but your idea is worth putting it in the class explicitly. Thanks again:)
 Dragos - 2010-06-26 01:37:42 - In reply to message 12 from Gergely Aradszki
suppose i have an array like this
Array
(
[id_produs] => 21
[firma] => {empty_string}
[categorie] => {empty_string}
[denumire] => xcvcxv
[descriere] => cxvcxvxcv
[thumbs] => {empty_string}
[media] => {empty_string}
[data] => fDate Object
(
["date":"fDate":private] => -7200
)
with field and value can i fill the field automaticaly with this values from database?
 Gergely Aradszki - 2010-06-26 02:00:59 - In reply to message 13 from Dragos
You can set initial values when you declare your fields. These values will be used when the form has not benn submitted yet. It must be given as the fifth parameter:
addField(type, id, label, is_mandatory, initial_value)
Btw, I've written a short "userGuide", still need some small changes, then I'll upload it too, It may help people see the methods much clearly.
 Dragos - 2010-06-26 03:11:08 - In reply to message 14 from Gergely Aradszki
yes i know about initial field but i was thinking maybe it's something more easy way to interesct a given array with existing inputst.
 Gergely Aradszki - 2010-06-26 10:26:01 - In reply to message 15 from Dragos
well, you can map your array to the corresponding $_POST or $_GET array, that would also fill the the fields. (But then it is your task to check whether the $_POST items are set or not.)
But you're right again, it would be nice to include a function to automatize this. Another feature is on its way:)
 Gergely Aradszki - 2010-07-02 11:08:35 - In reply to message 15 from Dragos
I've updated the class, now you can load data from arrays.
Also added a small userGuide, to make the usage of the class easier. And thanks again for the suggestions:D
|