How to Display a Completed Form in an Article

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
qubie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Wed Feb 18, 2009 7:41 am

How to Display a Completed Form in an Article

Post by qubie » Mon Sep 26, 2011 3:11 am

Using j1.7.0:

I can create forms using various forms extensions or with custom html forms and collect form data.

What I don't know how to do is:

How to publish a completed form to an article (or in other words, publish a custom 'report' which extracts some of the information collected from forms already residing in a MySQL db)?

Being relatively novice at PHP/MySQL programming, I don't want to have to program the whole thing from scratch (would be fun but too time consuming ... have to get a large website published without getting too bogged down in details).

Ultimately what I'm after is to create an individual profile page for each member of a team (there will be a few hundred players). Selecting a member's name from a list would bring up an individual profile page. Each profile page would have the same format (e.g. photo, name, player stats, etc.) but obviously would pull the data from a database to populate the field in the profile page (i realize this is a classic db application).

Thx.

cassius
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Fri May 02, 2008 7:35 pm

Re: How to Display a Completed Form in an Article

Post by cassius » Wed Sep 28, 2011 6:50 pm

If you don't want to get involved with creating a plugin and getting it to work with /install on Joomla, you could use DirectPHP to get the necessary data and use TinyButStrong for the template. It seems you realize this will require some php/mySQL, but doing it through DirectPHP and TinyButStrong will allow you to break out of the Joomla programming paradigm and work within your own skill set.

I've recently started diving into modifying Joomla using some of the core functionality (extending core objects etc.) But I can see that if you feel limited in your programming skills it will be a bit easier to work on code that isn't 'joined at the hip' with Joomla core (if that makes sense).

Just my $0.02.
My two golden rules improving this forum
1) Close the loop on threads you start. Others with the same problem will read your thread in the future. Help them by sharing what worked.
2) Try to answer one question for every question you ask.

qubie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Wed Feb 18, 2009 7:41 am

Re: How to Display a Completed Form in an Article

Post by qubie » Wed Sep 28, 2011 9:02 pm

Thanks Cassius. This gives me a direction to go in, short of developing the whole thing from scratch (which I'll do eventually but I'm too busy at the moment with this project to burry myself that deeply ... ie the plugin creation).

A few newbie questions for you before I head out in the direction you suggest:

DirectPHP shows as being j1.6 compatible. Do you know off hand if it is j1.7 compatible?

I'm assuming (after a 1 min review of both apps) that I will be using TinyButStrong offline (not sure of the environment yet, e.g. desktop/stand-alone app?) to create the php code which queries the database and to format the report in a table-like manner and then I'll use DirectPHP to embed the resulting PHP code in say an article (which is what I want, though it might also be able to be used to embed in modules also ... don't know yet). Is this correct?

What i was sort of hoping for was that someone familiar with or from the developer community would come back and say something like:

'Well ... this is so simple, you use the 'MagicCustomForm' (or CB or some other forms generator) to obtain the user data and then use their report generator component/plug in to publish your custom report in an article'.

I'm still rather surprised that this type of functionality isn't in fact very common in Joomla. It seems there are numerous extensions available to produce custom forms to 'get' data from users. I can't believe those extensions don't let you publish the data you collected as easily as they allow you to acquire it. Or am I completely missing the point?

cassius
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Fri May 02, 2008 7:35 pm

Re: How to Display a Completed Form in an Article

Post by cassius » Wed Sep 28, 2011 9:43 pm

^^^^

Oops, sorry about the version. Maybe Sorcerer would work for you (though I've never used it,. myself).

http://extensions.joomla.org/extensions ... ntent/5051

If you aren't already set up with a local environment using XAMPP, I would recommend doing that. You can use an editor like Aptana to manipulate the relevant files. I think you would want two files

1) PHP file were the queries are executed and the data assembled
2) PHP file where the TBS template resides (see the TBS tutorials for linking the files and preprocessing the data).

Not sure I can give you a satisfactory answer on the rest. I would just say that reporting requirements can be very complex and developing an abstraction layer to allow users to configure reports through a GUI doesn't necessarily seem like a small task. (There's a reason Crystal Reports costs so much). Also, the way the data is stored from such extensions might make an abstraction llayer rather difficult to implement without performance issues.

EDIT: I recommend developing the solution in two files because it still separates presentation from application logic.
My two golden rules improving this forum
1) Close the loop on threads you start. Others with the same problem will read your thread in the future. Help them by sharing what worked.
2) Try to answer one question for every question you ask.

qubie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Wed Feb 18, 2009 7:41 am

Re: How to Display a Completed Form in an Article

Post by qubie » Thu Sep 29, 2011 11:44 am

Thanks again for replying Cassius.

I've been developing under XAMPP for a few years. All good there. Similarly with Dreamweaver. Dozens of Joomla websites under my belt but haven't delved into the custom db report creation yet, hence the newbie questions.

Your suggestions make sense to me (ie two php files). Will approach it as you suggest.

Dreamweaver seems setup to allow the creation of Recordsets to retrieve db data. Haven't tried that approach either. Not sure about the pros and cons or whether it's just a different means to the same end.


Locked

Return to “General Questions/New to Joomla! 2.5”