User data in Joomla 1.5

Here's a forum to share the forms that you create. Show the code and add a picture - or a link to the form on the web.

User data in Joomla 1.5

Postby luykmhm on Tue Dec 18, 2007 5:13 am

I spent a long time figuring out how to display registered user data in my form. There is a lot of information in this forum but most of it is regarding Joomla 1.0. I am using Joomla 1.5. Pay attention to the VALUE attribute.

Good luck with this wonderful tool.

Hopefully you can use this information.
Code: Select all
<form id="form1" name="form1" method="post" action="">
  <p>Aanmelden voor thema -avond Persoons Gebonden Budget </p>
  <table width="200">
    <tr>
      <td>Naam</td>
      <td><input name="Naam" type="text" id="Naam" size="40" maxlength="40" value="<?php $user = &JFactory::getUser();echo $user->name;?>" /></td>
    </tr>
    <tr>
      <td>Email</td>
      <td><input name="email" type="text" id="email" size="30" maxlength="30" value="<?php $user = &JFactory::getUser();echo $user->email;?>" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap">Aantal personen </td>
      <td><input name="aant_pers" type="text" id="aant_pers" size="2" maxlength="2" /></td>
    </tr>
  </table>
  <p>
    <input type="submit" name="Submit" value="Verstuur aanmelding" />
  </p>
</form>
<br><br>Post edited by: luykmhm, at: 2007/12/18 00:17
luykmhm
Fresh Boarder
 
Posts: 8
Joined: Sat Dec 01, 2007 7:49 am

Re:User data in Joomla 1.5

Postby GreyHead on Sat Dec 22, 2007 6:09 pm

Hi luykmhm,

Great, thank you.

Bob
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
User avatar
GreyHead
Platinum Boarder
 
Posts: 3253
Joined: Tue May 29, 2007 10:15 pm
Location: Brittany

Re:User data in Joomla 1.5

Postby Raymon on Tue Feb 12, 2008 5:34 am

Great Lukyhmh!!!

This is what i've been looking for quite some time now... How did you get to this solution? I'd really like to learn more about this kind of stuff... And looking in the api reference is like looking at a bool full of spagheti for a novice like me!

Thnx Again!

Grtz,
Raymon
Raymon
Fresh Boarder
 
Posts: 17
Joined: Mon Feb 11, 2008 10:27 pm

Re:User data in Joomla 1.5

Postby admin on Tue Feb 12, 2008 5:50 am

Hi Raymon,

The API is for joomla itself, check their API site! but the code above is to be inserted in ChronoForms!

Cheers,

Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 2355
Joined: Mon Aug 14, 2006 5:29 am

Re:User data in Joomla 1.5

Postby Raymon on Tue Feb 12, 2008 5:57 am

Hi Max,

Sorry, I wasn't clear, I meant the Joomla Api.

Grtz,
Raymon
Raymon
Fresh Boarder
 
Posts: 17
Joined: Mon Feb 11, 2008 10:27 pm

Re:User data in Joomla 1.5

Postby admin on Tue Feb 12, 2008 5:59 am

No worries, google Joomla API and you will get it!

Cheers,
Max
ChronoForms/ChronoConnectivity/ChronoComments Developer Thanks for using our components!
If you have any problems with any extension please tell us.
If you like any of our extensions please post a review at Joomla.org
Want users to submit their content to your website ? try Submit Story
Want to list/edit/delete your data ? try ChronoConnectivity
Want to have stylish AJAX comments ? try ChronoComments
User avatar
admin
Platinum Boarder
 
Posts: 2355
Joined: Mon Aug 14, 2006 5:29 am

Re:User data in Joomla 1.5

Postby zoopzoop on Thu Apr 10, 2008 10:48 pm

luykmhm, you can improve your code a bit by just calling the
Code: Select all
$user = &JFactory::getUser();
once.
Like this:
Code: Select all
<? $user = &JFactory::getUser(); ?>
<form id='form1' name='form1' method='post' action='' >
...
<td><input name='Naam' type='text' id='Naam' size='40'
    maxlength='40' value='<?= $user->name; ?>' /></td>
...
<td><input name='email' type='text' id='email' size='30'
    maxlength='30' value='<?= $user->email; ?>' /></td>
zoopzoop
Fresh Boarder
 
Posts: 3
Joined: Thu Apr 10, 2008 3:43 pm

Re:User data in Joomla 1.5

Postby wcsconcierge on Sat May 24, 2008 4:21 pm

Sounds like what I need -- but I searched for JFactory in the Joomla extensions directory. Do you know how I can get this?
wcsconcierge
Fresh Boarder
 
Posts: 6
Joined: Sat May 24, 2008 3:31 pm

Re:User data in Joomla 1.5

Postby wcsconcierge on Sat May 24, 2008 5:41 pm

-- Never mind, JFactory is part of the Joomla Framework.
wcsconcierge
Fresh Boarder
 
Posts: 6
Joined: Sat May 24, 2008 3:31 pm

Re:User data in Joomla 1.5

Postby sketteksalfa on Thu Jul 24, 2008 10:14 am

wow, exactly what im looking for as i went on this forum today.
www.pagbabahay.com - one of the leading real estate portal in the PHilippines.
sketteksalfa
Fresh Boarder
 
Posts: 5
Joined: Wed Feb 07, 2007 1:40 am


Return to Share your forms with others

Who is online

Users browsing this forum: No registered users and 1 guest