I have asked about this before but that thread went over to another question. http://www.chronoengine.com/forums/posts/f26/t86981/populate-field-with-values-from-table-db.html
I want to service my users with some suggestions of values in the form. e.g. their name address etc. these values must be taken from their previous record. e.g. my user has posted 10 posts with some common values and some unique values. The common values may be the same in 9 times of 10 and then my form suggest these common values.
In CFv3 I have this feature with som simple coding.
And in default value for the textbox I just use this.
It is simple and works with validation.
I tried to use DB Loader Action but it loaded every value and from the first record. If I put in ORDER BY in WHERE clause under Advanced Tab I get an error-message.
//JeLu
I want to service my users with some suggestions of values in the form. e.g. their name address etc. these values must be taken from their previous record. e.g. my user has posted 10 posts with some common values and some unique values. The common values may be the same in 9 times of 10 and then my form suggest these common values.
In CFv3 I have this feature with som simple coding.
<?php>
$dbfo =& JFactory::getDBO();
$query = "SELECT ftag FROM `#__chronoforms_my_form` WHERE cf_user_id = '$my->id' ORDER BY `cf_id` DESC LIMIT 1";
$dbfo->setQuery($query);
$foretag = $dbfo->loadResult();
?>
And in default value for the textbox I just use this.
<?php echo $foretag; ?>
It is simple and works with validation.
I tried to use DB Loader Action but it loaded every value and from the first record. If I put in ORDER BY in WHERE clause under Advanced Tab I get an error-message.
//JeLu