Forums

Unable to view form on Home page

LoriB01 16 Mar, 2009
Hello,

I'm a total Joomla and Chronoforms noob and I'm in need of some help. I followed the excellent tutorials and created a log in form and a survey form, both appear to work and look fine to me. I'd really like to share them with others but I can't seem to figure out how to get them into the home page (or any other page for that matter). I need one more tutorial to explain that part.
What I'm trying to do is create something where people can log in and take my survey but if they can't complete it they can log back in and finish where they left off. Sadly, I can't even get them to see the login or survey.

I'd appreciate any help I can get, thanks🤨
GreyHead 16 Mar, 2009
Hi LoriB01,

In the Joomla Admin go to the Menu Manager and create a new 'ChronoForms' menu item - you'll need to enter your form name in the box on the right after the item is created.

There's no great difficulty in having a form that people can come back and complete later - but it is a bit complex to set up if you are a beginner. First thing is to get your form saving data to a database table. Then you'll need to decide how to identify people when they come back. Will they be registered on your site (this is easiest)?

Bob
LoriB01 16 Mar, 2009
Thanks, I'll try that first thing tomorrow.

Yes, the users will logo in, I seem to have that working successfully but I couldn't see any forms on the home page. If their is an artical somewhere that explains how I could set things up with the user-user return I'd love to see it. I searched for these answers but was unsuccessful.

Thanks again,
I appreciate it.
GreyHead 17 Mar, 2009
Hi LoriB01,

Here's a rough example of some Form HTML, will need debugging and polishing:
<?php
$user =& JFactory::getUser();
$db   =& JFactory::getDBO();
$query = "
  SELECT *
    FROM `#__some_db_table` 
    WHERE `id` = $db->quote($user->id);
  ";
$db->setQuery($query);
$result = $db->loadObject;
if ( count($result) == 0 ) {
  // add some code to set null values if object isn't found - this is a new user!
} 
?>
<input type='text' name='field_name' id='field_id' value='<?php echo $result->field_name; ?>' />
. . .

Bob
This topic is locked and no more replies can be posted.