Forums

new bie's lame question

sgr 08 Apr, 2009
Thanks to the coder(s) who has made this wonderful component and made it free too.

Hats off.

Now my stupid question, In my form which user submit i want to capture the logged in user and the email of the user. i tried all type of search to see anything match i couldnt find pls guide me.

To show my thanks i just bought the license to help this lovely tool to grow.
GreyHead 08 Apr, 2009
Hi sgr,

That's here in the forums dozens of times . . .

You can access the Joomla user object using
$user =& JFactory::getUser();


Bob
sgr 08 Apr, 2009
sorry bob,

i was sure it will be some where but way of search wud have not got any. sorry !! but how can capture it in form? pls i am lamer in this just trying to learn joomla.
GreyHead 08 Apr, 2009
Hi sgr,

Try [forumsb]getUser[/forumsb]

Then experiment with some of the code snippets you find.

Bob
sgr 09 Apr, 2009
Thanks a lot greyhead.

the search was helpful. but i am facing the problem

my date and time picker is not showing me the calendar my code is here


<div class="form_item">
  <div class="form_element cf_heading">
    <h1 class="cf_text">Jurong Pass Applying System.</h1>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Name ::</label>
    <input class="cf_inputbox required" maxlength="150" size="30" id="text_1" name="txt_name" type="text" />
  <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Name :: :: As Per IC</div>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">IC / WP / EP ::</label>
    <input class="cf_inputbox required" maxlength="150" size="30" id="text_2" name="txt_ic" type="text" />
  <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">IC / WP / EP :: :: Please give correct Info</div>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label">Company Name ::</label>
    <input class="cf_inputbox required" maxlength="150" size="30" id="text_3" name="txt_company" type="text" />
  <a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" src="components/com_chronocontact/css/images/tooltip.png"/></a>
				<div class="tooltipdiv">Company Name :: :: Company from which the visitor is coming</div>
  </div>
  <div class="clear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_datetimepicker">
    <label class="cf_label">Starting Date</label>
    <input class="cf_datetime required" maxlength="-1" size="20" id="date_6" name="date_6" type="text" />
    
  </div>
  <div class="clear"> </div>
</div>


<div class="form_item">
  <div class="form_element cf_datetimepicker">
    <label class="cf_label">End Date</label>
    <input class="cf_datetime required" maxlength="-1" size="20" id="date_7" name="date_7" type="text" />
    
  </div>
  <div class="clear"> </div>
</div>
<?php
$user =& JFactory::getUser(); // get the user info
?>
<input type='hidden' name='user_id'  value='<?php echo $user->email; ?> '/>
<div class="form_item">
  <div class="form_element cf_button">
    <input value="Submit" type="submit" />
  </div>
  <div class="clear"> </div>
</div>



what went wrong i remove the php code its working😟
Max_admin 09 Apr, 2009
Hi sgr,

which Chronoforms version is this ? we need to try with RC4 with all browser cache clear!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sgr 09 Apr, 2009
i am using 3.1 RC4 and i have never used chrono before so this is the first time i am trying out
Max_admin 09 Apr, 2009
it looks like there is a small bug, you need to add the date field name in the "date fields names" field under the auto generated tab and it will work, I will try to find out why it doesn't work!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 09 Apr, 2009
Hi sgr,

I found a problem with this and fixed it in RC4.1 which I will put online later today!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sgr 09 Apr, 2009
Thanks for doing the quick fix🙂
Max_admin 10 Apr, 2009
No problems, its online, easy upgrade pack, no re installation needed!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.