This question seems to be asked a lot, but I am not finding an answer written simply enough to help a daft person like myself.
I am using Community Builder (CB), and have a donation form created in CFv5. When a person logs onto the site, then goes to the donation form, I would like certain information to load from CB for that user.
I have successfully been able to pull in information from the joomla users database table, using scripts I have found.
I used a custom html box and added:
This works great for the username from the joomla users table.
But now I want to pull in information from a different table. I have street address and other information in a CB table, that I would like to populate if they have information in that field.
I have looked at this article, but I am not certain how to actually implement it in a form.
Can someone walk me through the steps to populate information from a database table besides "users".
What additional information would be needed to help answer this question.
Thanks,
Melvins138
I am using Community Builder (CB), and have a donation form created in CFv5. When a person logs onto the site, then goes to the donation form, I would like certain information to load from CB for that user.
I have successfully been able to pull in information from the joomla users database table, using scripts I have found.
I used a custom html box and added:
<div class="gcore-subinput-container" id="fitem">
<label for="contact_name" class="control-label gcore-label-top">Full Name:</label>
<div class="gcore-input pull-left gcore-sub-input gcore-display-table" id="fin-custom">
<?php
$user =& JFactory::getUser();
$readonly = '';
if ( $user->id > 0 ) {
$name = $user->name;
$readonly = "readonly='readonly'";
}
?>
<div class="ccms_form_element cfdiv_text" id="email_container_div" style="">
<input name="ContactName" id="contact_name" placeholder="" class="validate['required'] form-control A" title="" style="" data-inputmask="" data-load-state="" data-tooltip="" value=" <?php echo $name; ?> " name="name" type="text" <?php echo $readonly; ?> />
<div class="clear"></div>
</div>
</div>
</div>
This works great for the username from the joomla users table.
But now I want to pull in information from a different table. I have street address and other information in a CB table, that I would like to populate if they have information in that field.
I have looked at this article, but I am not certain how to actually implement it in a form.
Can someone walk me through the steps to populate information from a database table besides "users".
What additional information would be needed to help answer this question.
Thanks,
Melvins138