Hi,
I would use "Getting information from a DB table to include in your form", but with plugin multipage, this procedure doesn't work for "textarea" and "text" from the second page. :?
No default value is displayed, except in the first page.
however, it's work with "radio", "checkbox" and "option", in first and next page.😲
It's a bug... or it's me ?🤣
David.B
----------------------
APACHE 2.2.11, PHP 5.3.0, MYSQL 5.1.36, JOOMLA! 1.5.22, Mootools 1.2.4, ChronoForms 3.2.0
I would use "Getting information from a DB table to include in your form", but with plugin multipage, this procedure doesn't work for "textarea" and "text" from the second page. :?
No default value is displayed, except in the first page.
however, it's work with "radio", "checkbox" and "option", in first and next page.😲
It's a bug... or it's me ?🤣
David.B
----------------------
APACHE 2.2.11, PHP 5.3.0, MYSQL 5.1.36, JOOMLA! 1.5.22, Mootools 1.2.4, ChronoForms 3.2.0
Hi David.B,
It should work - I hope. Please post the code you are using for the text input and textarea so that I can take a look.
Bob
It should work - I hope. Please post the code you are using for the text input and textarea so that I can take a look.
Bob
Even if i use a string simple without database, it doesn't work ! :?
Without database :
With database :
In two cases, when i permute the page first with the second. This verifies that the syntax of page second is good.
That's what I don't understand !😲
David.B
Without database :
<div class="form_item">
<div class="form_element cf_textarea">
<label class="cf_label" style="width: 450px;">How display a default value ?</label>
<textarea class="cf_inputbox required" rows="2" id="text_6" title="" cols="65" name="Question">Default value</textarea>
</div>
<div class="cfclear">Â </div>
</div>
With database :
<?php
$id= JRequest::getVar('id');
$db =& JFactory::getDBO();
$query = "SELECT * FROM #__chronoforms_test WHERE id='".$id."' ORDER BY cf_id DESC LIMIT 1";
$db->setQuery( $query, 0);
if ($Exist = $db->loadObjectList()) {
$test2=$Exist[0]->test2;
}else{
$test2='No value';
}
?>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 500px;">Second test with database :</label>
<input class="cf_inputbox required validate-alphanum" maxlength="10" size="5" title="" id="text_7" name="test2" type="text" value="<?php echo $test2; ?>" />'
</div>
<div class="cfclear">Â </div>
</div>
In two cases, when i permute the page first with the second. This verifies that the syntax of page second is good.
That's what I don't understand !😲
David.B
Hi David.B,
I copied your code into a new form and linked it to a simple database and both examples work perfectly.
I have no idea why they aren't working in your form, there is nothing complicated here - especially with the first example :-(
Bob
I copied your code into a new form and linked it to a simple database and both examples work perfectly.
I have no idea why they aren't working in your form, there is nothing complicated here - especially with the first example :-(
Bob
Bob, thank you for your test. :wink:
Now I know that it should work, I'll still keep on searching...
I have created two new forms (mutlipage) and it's true, it works !😲
To understand, I will recreate, test and compare my forms, step by step, and I'll be back to tell you where is the error...🙄 if I find it. :?
David.B
Now I know that it should work, I'll still keep on searching...
I have created two new forms (mutlipage) and it's true, it works !😲
To understand, I will recreate, test and compare my forms, step by step, and I'll be back to tell you where is the error...🙄 if I find it. :?
David.B
Hi Bob,
I'm sorry but I have not found where is the error :? , but as it works with a new form, that's the main thing. :wink:
I just know that I renamed some controls in phpmyadmin.😶 Even if I don't see where and even if I can't to reproduce this error, maybe I have corrupted the database. :?
Conclusion in case of problems, we must recreate the form.🙄
Thank you for everything and keep up the good work. :wink:
David.B
I'm sorry but I have not found where is the error :? , but as it works with a new form, that's the main thing. :wink:
I just know that I renamed some controls in phpmyadmin.😶 Even if I don't see where and even if I can't to reproduce this error, maybe I have corrupted the database. :?
Conclusion in case of problems, we must recreate the form.🙄
Thank you for everything and keep up the good work. :wink:
David.B
This topic is locked and no more replies can be posted.