I've updated that file with the following:
| Code: |
<?xml version="1.0" encoding="UTF-8"?>
<form>
<params addpath="/administrator/components/com_ariquiz/elements">
<param type="text" name="UserName" size="50" label="COM_ARIQUIZ_LABEL_NAME" description="" />
<param type="text" name="Email" size="50" label="COM_ARIQUIZ_LABEL_EMAIL" description="" />
<param type="text" name="mailAddress" size="50" label="COM_ARIQUIZ_LABEL_ADDRESS" description="" />
<param type="text" name="phone" size="50" label="COM_ARIQUIZ_LABEL_PHONE" description="" />
</params>
<params addpath="/administrator/components/com_ariquiz/elements" group="readonly">
<param type="literal" name="UserName" label="COM_ARIQUIZ_LABEL_NAME" description="" />
<param type="literal" name="Email" label="COM_ARIQUIZ_LABEL_EMAIL" description="" />
<param type="literal" name="mailAddress" label="COM_ARIQUIZ_LABEL_ADDRESS" description="" />
<param type="literal" name="phone" label="COM_ARIQUIZ_LABEL_PHONE" description="" />
</params>
|
as well as view.html.php with:
| Code: |
class AriQuizSubViewQuizFormGuestForm extends AriSubView
{
function display($quiz, $tpl = null)
{
$userQuizModel = AriModel::getInstance('Userquiz', 'AriQuizModel');
$ticketId = $userQuizModel->getGuestTicketId($quiz->QuizId);
$data = array('UserName' => '', 'Email' => '', 'mailAddress' => '', 'phone' => '');
$readOnly = false;
if (!empty($ticketId))
{
$userQuiz = $userQuizModel->getStatisticsInfoByTicketId($ticketId, 0, array(ARIQUIZ_USERQUIZ_STATUS_PROCESS, ARIQUIZ_USERQUIZ_STATUS_PREPARE), $quiz->QuizId);
if (!is_null($userQuiz))
{
$extraData = $userQuiz->parseExtraDataXml($userQuiz->ExtraData);
$data['UserName'] = AriUtils::getParam($extraData, 'UserName');
$data['Email'] = AriUtils::getParam($extraData, 'Email');
$data['mailAddress'] = AriUtils::getParam($extraData, 'mailAddress');
$data['phone'] = AriUtils::getParam($extraData, 'phone');
foreach ($data as $key => $value)
{
if (empty($value))
$data[$key] = ' ';
}
foreach ($extraData as $key => $value)
if (!isset($data[$key]))
$data[$key] = $value;
$readOnly = true;
}
}
else
{
$data['Email'] = AriUtils::getParam($_COOKIE, 'aq_email', '');
$data['UserName'] = AriUtils::getParam($_COOKIE, 'aq_name', '');
$data['mailAddress'] = AriUtils::getParam($_COOKIE, 'aq_address', '');
$data['phone'] = AriUtils::getParam($_COOKIE, 'aq_phone', '');
}
|
Which brings up the form field, validates that there is something there, and pushes the user into the quiz. However, the 'title' next to the input field appears as COM_ARIQUIZ_LABEL_ADDRESS and COM_ARIQUIZ_LABEL_PHONE instead of with a proper title. Also, the data captured in those two fields, is not passed to the result table on the backend of ARI Quiz in a formatted column. What do I need to add to correct the titles, and how do I get the captured data to appear in a useable form?
THANK YOU!