Forums

Submitting joomla username

sananthv 16 Apr, 2010
I am currenlty evaluating Chronoforms before I purchase. I have designed a form which will be visible in joomla only when you login. The information they fill will be submitted to the CRM. I have a hidden field which will submit the joomla username.

The moment I insert the php code (form code > Form HTML) the form does not work. I have given bellow what I have entered
<input value="Leads" id="hidden_7" name="moduleName" type="hidden" />

<?php
$my = JFactory::getUser();
$username  = $my->username;
<input value= "echo $username" id="hidden_6" name="cf_550" type="hidden" />;
?>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">First name</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="firstname" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

Appreciate if you could advise as to where I have gone wrong.
sananthv 16 Apr, 2010
resolved. See code bellow.
<input value="Leads" id="hidden_7" name="moduleName" type="hidden" />

<input value="<?php $my = JFactory::getUser(); $username  = $my->username; echo $username; ?>"  id="hidden_6" name="cf_550" type="hidden" />


<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">First name</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_0" name="firstname" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>
This topic is locked and no more replies can be posted.