write data in other table when form is submitted

For which purpose would this idea be good for.

  • automatic content building

    Votes: 0 0.0%
  • learning purposes for placeholders

    Votes: 0 0.0%
  • nothing...

    Votes: 0 0.0%

  • Total voters
    0
  • Poll closed .

verzevoul

Member
Hi!
Its been a while I haven t visited seriously your webiste and I can tell its super! Bravo!
I have a question about a webisite I m trying to build.

I need to add a record to a list and do the following,
1. Create a new row in another joomla table (content table 2.5 joomla)
2. Grab the id of the content item and parse it in the table of my current list.
3. This id will come as a placeholder after the content default url (index.php?option=com_content&view=article&id={mplampla1_raw}&Itemid={mplampla2_raw}&lang=el{mplampla3_raw}

and do this with 1 from submision. I believe there is a plugin for the redirecton but with this solution I ll have to resubmit a new form, and I have no idea how to grab all these ids.

Thanks!
 
Hi

There's an upsert form plugin (http://fabrikar.com/forums/index.php?wiki/upsert-form-plugin/) which will allow you insert data into another table. However, it runs after the form data is already stored.
So you would need to use a PHP plugin to do this, see this example http://fabrikar.com/forums/index.ph...e-a-form-s-field-with-the-records-primary-key

However, I'm not sure what you mean in part 3 of your requirements? Do you mean you want to redirect to that article? If so you could add to your PHP form pluign:

PHP:
$app = JFactory::getApplication();
$app->redirect('index.php?option=com_content&view=article&id=' . $id . '&Itemid={mplampla2_raw}&lang=el{mplampla3_raw}');
 
Thanks for the response.
Actually what I want to do is create a new j-menu and automatically assign to it an article. An empty article. So adding a new menu in j-frontend will always have an article (empty on it).
Is your example ok above?
 
Probably ok, I'm pretty sure you just need one database insert to make the menu item.
 
Ok. I managed to write data in another list but it creates a new row in that list. How can I tell to the plugin to write these data in the row with the latest id?
If i can t Ill give it a try with the other plugin (php) you proposuded
 
Ok. I managed to write data in another list but it creates a new row in that list. How can I tell to the plugin to write these data in the row with the latest id?
Not sure what you are asking? sorry :( Could you explain more please?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top