Welcome, Guest

Load forms filled whit login data - how?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Load forms filled whit login data - how?

Load forms filled whit login data - how? 1 year, 11 months ago #12466

Could you point out some direction...

I like to add a login possibility, whereto name, company ets. could be filled in. When opening a form the known information is already filled out. How could this be made?

- Any special login plugin to be used?


Regards,
David

Re: Load forms filled whit login data - how? 1 year, 11 months ago #12483

Hi David,

That is possible if you are trying to take the data from another Joomla database table with the same prefix. (By default, it would be jos_SomeTableName.)

If you contact support with complete details on what you need, I'm sure we'll be able to help you. (You'll just get support much quicker going through that system than here on the community forums.)

Thanks,

Terry
BreezingForms Customer Care
  • terrywmu
  • OFFLINE
  • Administrator
  • Posts: 527
  • Karma: 8

HOW-TO Load forms filled with login data 1 year, 10 months ago #13178

This is one way to do it....

Before Form Piece:
// Get the lead info for the current user
$this->execPieceByName('ff_InitLib');
global $database, $record, $my;
$id = $my->email; 
$database->setQuery("
SELECT * 
FROM jos_[your table]
WHERE email =  '$id'"
);
$row = $database->loadObjectList();
$record = $row[0];


Form Values:

Name:(This gets the Data from Joomla)
<?php $user = &JFactory::getUser();return $user->name;?>


Email:(This gets data from Joomla)
<?php $user = &JFactory::getUser();return $user->email;?>

Home Phone:
<?php global $record; return $record->hphone; ?>


Mobile Phone:(This gets data from your table)
<?php global $record; return $record->mobile; ?>


Today’s Date:(This is just a PHP script to get the date)
<?php return date("m/d/Y") ?>


This is assuming you have a table that contains the data you want to use to fill in the values and that one of the fields in that table has the 'email' value in common with your Joomla user database.

There are other ways to do it, but this one works pretty well. Please let me know if you have any questions. This forum is all about helping each other.
  • erichhaubrich
  • OFFLINE
  • Senior Boarder
  • Web Ninja and Technology Geek
  • Posts: 62
  • Karma: 3
I love Breezing Forms! - It is the Killer App for Forms on Joomla!

Re: Load forms jos_comprofiler data - how? 1 year, 9 months ago #13399

Terry:

I am trying to pull data into a form from jos_comprofiler based on email.

I am using quickmode

I am using integrator (with success!) to post to jos_comprofiler fields.


When I use the example code:

// Get the lead info for the current user
$this->execPieceByName('ff_InitLib');
global $database, $record, $my;
$id = $my->email;
$database->setQuery("
SELECT *
FROM jos_comprofiler
WHERE email = '$id'"
);
$row = $database->loadObjectList();
$record = $row[0];

and put this into valuefor the field where we want this...

<?php global $record; return $record->zipcode; ?>

I get this error...

*** EXCEPTION CAUGHT BY FACILEFORMS ***
PHP error level : E_NOTICE
PHP filename : /var/www/vhosts/bgiwebcoach.com/httpdocs/mobdev/components/com_facileforms/facileforms.process.php(1047) : eval()'d code
PHP linenumber : 1
Last known pos : data1 of pop[1] at line 1
Error message : Trying to get property of non-object

Your assistance is appreciated...

Sean
  • seancarew
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0

Re: Load forms jos_comprofiler data - how? 1 year, 5 months ago #15674

I get exactly the same issue and I don't know why either
  • lesk
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: HOW-TO Load forms filled with login data 1 year, 3 months ago #19390

Thank You so Much...
  • djdorado
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
  • Page:
  • 1
Moderators: TheMuffinMan, ForumSupport
Time to create page: 0.45 seconds

About

Crosstec GmbH & Co. KG

Bergisch-Gladbacher-Str. 829

51069 Cologne, Germany