Welcome, Guest
Username Password: Remember me

Save form data in joomla database instead of article
(1 viewing) (1) Guest

TOPIC: Save form data in joomla database instead of article

Re: Save form data in joomla database instead of article 2 years, 5 months ago #46

hi Everyone,

i have got the same problem.

Can i post my Template code? <?php
/**
* @version 1.7.0
* @author www.jseblod.com
* @copyright Copyright (C) 2009-2010 jSeblod. All Rights Reserved.
* @license GNU/GPL V2 License. www.jseblod-cck.com
* @package Ct Voti Form Template (Custom) - jSeblod CCK ( Content Construction Kit )
**/

// No Direct Access
defined( '_JEXEC' ) or die( 'Restricted access' );
?>

<?php
/**
* Init jSeblod Process Object { !Important; !Required; }
**/
$jSeblod = clone $this;
?>

<?php
/**
* Init Style Parameters
**/
include( dirname(__FILE__) . '/params.php' );
?>

<p><?php echo $jSeblod->action_voti->form; ?></p>
<p><?php echo $jSeblod->matchday->form; ?></p>
<p><?php echo $jSeblod->partita->form; ?></p>
<p><?php echo $jSeblod->squadra->form; ?></p>
<p><?php echo $jSeblod->giocatore->form; ?></p>
<p><?php echo $jSeblod->voto->form; ?></p>
<p><?php echo $jSeblod->submit_voti->form; ?></p>

<?php
$p_id = $jSeblod->giocatore->value;
$t_id = $jSeblod->squadra->value;
$m = $jSeblod->partita->value;
$md = $jSeblod->matchday->value;
$v = $jSeblod->voto->value;
$x=1;

$query = "INSERT INTO jos_bl_votes(p_id, t_id, m_id, md_id, vote, match_day) VALUES ('$p_id', '$t_id', '$m', '$md', '$v', '$x')";
$doinsert = CCK::DB_loadResultArray( $query );
?>

The table is correctly defined. Where do i wrong?

Re: Save form data in joomla database instead of article 2 years, 4 months ago #47

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
Hi Simon,

you once helped me with some problems I got.

Now Im back on the project.
Im trying to understand how to use the custom form template.

What I exactly want to do is:

1. Build a form, containing a select field with all users - What you already explained to me
2. After saving, the form data should be stored into a database.
3. In another step I want to see all form data in a kind of category list view.

Can you give me just a hint where to start?

best regards
Peter

Re: Save form data in joomla database instead of article 2 years, 4 months ago #48

  • kahr
  • ( User )
  • OFFLINE
  • Expert Boarder
  • Posts: 90
Hi flashpiet

To create a list containing Your content data, create a search type using the default list or the advanced list template or create a custom list template (which requires php skills).

Sort the data, make one or more of the fields linkable etc.

Call the search type from a menu point using jSeblod - Search Form & List View Layout ( jSeblod CCK ). Select the search type.

Hopefully You can get started from from this.

Kind regards

Re: Save form data in joomla database instead of article 2 years, 4 months ago #49

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
Hey,

thats a good point to start with.
Thank you.

I will report you back.

Best regards
flashpiet

Re: Save form data in joomla database instead of article 2 years, 4 months ago #50

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
hey kahr,

i've been trying for hours and hours to get that list view running.
But im totally stuck

basically what I want is an extend category&subcategory view.

that means:

subcategory name - category creation date - author of last edited/created document

At first I tryed to assign the default subcategory/category content type to the search, but that doesnt seem to work.

Maybe I really need to use a custom list template, I know a bit how to reference the fields. But not for sure.

Can you give me a little help with that?

Re: Save form data in joomla database instead of article 2 years, 4 months ago #51

  • kahr
  • ( User )
  • OFFLINE
  • Expert Boarder
  • Posts: 90
Hi flashpiet !

Details on these individual projects are difficult to describe on a short form forum as this one. And maybe i misunderstand Your needs.

What I can do is create a pack in which I have a form for registered users where they can type in data in a catch report form.

The form has the fields :
- Specie
- Date of catch
- Weight
- Length

I force the category in the action field to be jSeblod/catch report !

I then create a search type. Pressing the L button in the toolbar in the upper right shows the configure List setup.
Here You can select Your content type.

From another menu item I select the jSeblod - Search Form & List View Layout ( jSeblod CCK ). Select the search type.

This should give You a list of the content data type in in the form.

I'm not sure but maybe You've allready come this far.

Creating a custom template can be tricky but fun as well (if You think programming is funny).

I am actually newbie in terms of jSeblod but I have managed to do a couple of custom templates in this project.

I'll be glad to share the pack for demo.

Kind reagrds
Attachments:

Re: Save form data in joomla database instead of article 2 years, 4 months ago #52

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
Hi Kahr,

thanks for your quick replay.
As you assumed, I've already come this far.

For custom content types like your example that works fine.
But not for the category issue

But anyway, maybe ill be totally wrong and your pack gives me the right hints, or I missed something.

So it would be great, if you provide your pack for demo.

Best regards
Peter

P.S: I think I saw your fishing page. Nice one A friend of mine is also a passionate fisher. He just won a trip to canada.

Re: Save form data in joomla database instead of article 2 years, 4 months ago #53

  • SEBLOD - Bes
  • ( Admin )
  • OFFLINE
  • Administrator
  • Working on SEBLOD 2.5 GA
  • Posts: 3386
Hi,

For best perfomance in your search type, it is better (if you can) to use a filter by category (and not by content type). In this case use or create a field called "Search generic category", then you must specify id(s) of the category in the search match.

Best Regards
5 Things to Start with SEBLOD 1. Documentation 2. Videos 3. Getting Started & FAQ 4. Tips & Tricks 5. SEBLOD Forum
If you use SEBLOD CCK, please post a rating and a review at the Joomla! Extensions Directory. Thanks to you.!!"
Joomla! Extension Directory Team Member (JED)
Joomla! Showcase Team Member

Re: Save form data in joomla database instead of article 2 years, 4 months ago #54

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
Hi bes,

thanks for your reply.
I tried with "search generic category"

But it seems thats basically the wrong approach

What I want is an extend category&subcategory view.

that means:
subcategory name - category creation date - author of last edited/created document

Do you have a hint for me?

My next problem is that I need to finish that task till friday, otherwise I have a big problem

Re: Save form data in joomla database instead of article 2 years, 4 months ago #55

  • SEBLOD - Bes
  • ( Admin )
  • OFFLINE
  • Administrator
  • Working on SEBLOD 2.5 GA
  • Posts: 3386
hi flashpiet,

You can not use search type to list categories.

You can do a custom category template and use Joomla category blog view.

best Regards
5 Things to Start with SEBLOD 1. Documentation 2. Videos 3. Getting Started & FAQ 4. Tips & Tricks 5. SEBLOD Forum
If you use SEBLOD CCK, please post a rating and a review at the Joomla! Extensions Directory. Thanks to you.!!"
Joomla! Extension Directory Team Member (JED)
Joomla! Showcase Team Member

Re: Save form data in joomla database instead of article 2 years, 4 months ago #56

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
hi bes,

okay, so no search type.

Okay, so you mean I have to create a custom category template based on the "Category & SubCategories"?

if yes, how can I make the column headers sortable/clickable?

best regards and thanks in advance
Peter

Re: Save form data in joomla database instead of article 2 years, 4 months ago #57

  • SEBLOD - Bes
  • ( Admin )
  • OFFLINE
  • Administrator
  • Working on SEBLOD 2.5 GA
  • Posts: 3386
Yes, if you want to list your categories with custom field.

For the sortable column, i advise you to use this script: www.datatables.net/

We use it in many website and we will try to include by default in the next version.

Best Regards
5 Things to Start with SEBLOD 1. Documentation 2. Videos 3. Getting Started & FAQ 4. Tips & Tricks 5. SEBLOD Forum
If you use SEBLOD CCK, please post a rating and a review at the Joomla! Extensions Directory. Thanks to you.!!"
Joomla! Extension Directory Team Member (JED)
Joomla! Showcase Team Member

Re: Save form data in joomla database instead of article 2 years, 4 months ago #58

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
okay, I will try that. Sounds good. thanks

I've made some progress

But now im stuck with creating the mysql query, because its to complex.
Its like: SELECT name FROM content WHERE modified = DATE(TODAY) where catid = jseblod->subcategorie[i]['catid']

I know that doesnt belong here, because its a mysql issue

Re: Save form data in joomla database instead of article 2 years, 4 months ago #59

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
Hi,

thanks for your advice with data tables.

But now, I have another problem.
I've created some subcats via the "Category & SubCategories " content type.
That worked fine. But now I want the "Category & SubCategories" template just to list the subcats. When I click a subcategory, I want to have the regular joomla category list view, to show all documents belonging to that subcategory.

Best regards
flashpiet

Re: Save form data in joomla database instead of article 2 years, 4 months ago #60

  • flashpiet
  • ( User )
  • OFFLINE
  • Junior Boarder
  • Posts: 36
Hi Bes,

im stuck integrating the Data Tables extension.

the data tables js files are properly loaded.
my table structure is valid. The table is build inside the index.php of "categories&subcategories" template of jseblod.

I suppose you have more experience with joomla and data tables than me

It would be great, If you help me again.
I would very much appreciate that.

best regards
peter
Time to create page: 0.29 seconds