<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000066">
This is my form builder func<br>
<br>
function mymodule_search($form_values = null)<br>
<br>
Yes, I use that return ($form_values) into my query:<br>
<br>
$result = db_query('select name from {reports} where rid=%d', <br>
$form_values['saved']);<br>
$report = db_fetch_array($result);<br>
<br>
the $report always return my designed value from reports.name, but that
shows only in #description or #value, never #default_value.<br>
Even if I insert something in $report array, as mentioned before. Only
the inserted apear on #value, my table content shows only in
#description.<br>
<br>
big mistery!<br>
<br>
<br>
<br>
ufuk bayburt escreveu:
<blockquote
cite="mid:888304040801241008o7b960b04u1502cdc8b5280b22@mail.gmail.com"
type="cite">
<div>Does your form builder function get any parameter? Do you use
any of them in your query? Are you sure that they have the same values
on every build?<br>
<br>
</div>
<div class="gmail_quote">On Jan 24, 2008 7:53 PM, Feijó <<a
moz-do-not-send="true" href="mailto:patrao@legendas.feijo.info">patrao@legendas.feijo.info</a>>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div text="#000066" bgcolor="#ffffff">Yes, I'm using #multistep<br>
<br>
I thought about that, $form been built more than one time. My test
seens to point somewhere else.<br>
<br>
<br>
look at this:<br>
<br>
<br>
// my previous array $report, returned by db_fetch_array
<br>
$report['name'] .= ' something'; // I insert 'something' into it<br>
<br>
$form['saveit']['name'] = array(<br>
'#type' => 'textfield',<br>
'#title' => t('Name'),
<br>
<b> '#default_value' => $report['name'], <br>
</b><b> '#description' => $report['name'],<br>
</b><br>
<br>
what should be the result from default_value and description? The
same? No, look:
<br>
<br>
<div><label>Nome: </label><input maxlength="50" size="30"
value=" something" name="name">
<div>Array ( [name] => test something ) </div>
</div>
<div><label><br>
</label></div>
<br>
'something' shows on both outputs, but 'test' only in #descrtption. If
is the SAME source ($report['name']), where is 'test' ??? I'm geting
crazy with that :P
<br>
<br>
I can provide a demo site if its a good idea.<br>
<br>
<br>
Feijó<br>
<br>
<br>
Tao Starbow escreveu:
<div class="Ih2E3d">
<blockquote type="cite">Probably means your #value is getting set
through some other mechanism. FormAPI can be pretty subtle at times.
I seem to remember having a similar problem when I was playing around
with #multistep, but I don't remember how I fixed it. <br>
<br>
good luck, <br>
-tao <br>
<br>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
</body>
</html>