PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Get Form Entry by EntryID into an array or dataset or object?

  1. Anonymous
    Unregistered

    I've searched and seen a lot of references to RGFormsModel::get_form_meta(THE ID);
    and similar, but these snippets are always out of context can someone post a more complete example?

    I have a page that displays orders. GF is used to capture the order information. I can find all the data in DB but it is not obvious to me at lest how to link up the form's labels with the lead info. In reading through the documentation its clear GF intended to access this information indirectly, where I am struggling is the how?

    I planned to have a button, pass the entryID to a function. That function would fetch GF entered info with labels as an array or dataset or object or whatever and then I can render it from there.

    Is there a method to return an entry and if so... how? This info is done by our QC follow up team weekly. It is outside of the submit and not associated with any event performed during GF submission.

    Posted 14 years ago on Sunday November 6, 2011 | Permalink
  2. Anonymous
    Unregistered

    umm... anyhow this did the trick, thanks for all the help.

    [php]
    Function getOrderInfo($entryid=0)
    {
    	if ($entryid==0) $entryid=$_GET['entry'];
    	if ($entryid==0) return;
    	$entry = RGFormsModel::get_lead($entryid);
    	$form = RGFormsModel::get_form_meta($entry['form_id']);
    	$content =  '<h3>'.$form['title'].'</h3>';
    	foreach($form['fields'] as &$field){
    		$content=$content.'<b>'.$field['label'].":</b> ".$entry[$field['id']].'';
    	}
    	return $content;
    }
    Posted 14 years ago on Tuesday November 8, 2011 | Permalink
  3. Glad you were able to work that out. Thank you for posting your code.

    Posted 14 years ago on Tuesday November 8, 2011 | Permalink