Request Form

Load client details from a separate database form in ChronoForms.

Overview

The issue occurs when trying to use a DB Read action to fetch data from a 'Details' form based on a client name stored in a different 'CRequest' form, as the provided PHP code incorrectly references the current user's data instead of the stored request value.
Use the DB Read - Relations feature in CF to correctly link and retrieve the client details from the 'Details' form by establishing a relationship based on the client name stored in the 'CRequest' form.

Answered
U U Can Drive 14 Dec, 2015
I have a form with the following fields:

Name
Address
Phone

Each client fills in these details under their own profile with a DB Save function to the form "Details".

---

I then have a form with just one field:

Request

I enter the clients Name from my profile with a DB Save function to form "CRequest".

---

A new form uses DB Read to read the "CRequest" form and get the Request field using the following code:
<?php
$user = JFactory::getUser();
return array("user_id" => $user->get("id"));
?>

I then want to use DB Read to read the "Details" form and load the requested clients details. I'm trying to use:
<?php
$user = JFactory::getUser();
return array("Request" => $user->get("Name"));
?>

This is not working😟

---

The new form has all the fields from both previous forms.
Do I need to change the Conditions code more than I have?
Do I need to use the DB Read - Relations form?
Am I going about this the wrong way?

Thank you
This topic is locked and no more replies can be posted.