15 Posts
Kleber
9 years ago
3
Topic

Hello, How I can edit a form to automatically save a content, direct with php?

For example,when I place this url: index.php/form?firstvalue=testv&secondvalue=testv2

I need to automatically get the vars, relate to fields and save, just using php.

I did that using this jquery in a custom form template:

jQuery(document).ready(function() { JCck.Core.submit(); });

But I really need to do this using only php. I have a application that runs in another server and will send vars for a url like this one: http://myserver/index.php/form?firstvalue=testv&secondvalue=testv2

The problem is that the aplication will run php but it will not run any client-side code like javascript/jquery, it will not open any browser windows, it will only follow the code. (tested with a php form to send a email and it works well).

Which code or function I need to make it run?

Which seblod file can help me to find this function? 

I found this one: components/com_cck/views/form/view.html.php But I am not sure if it gives me any light.

Get a VIP membership
693 Posts
rpoy
9 years ago
1
Level 1

Hi Kleber,

It appears that this is beyond the scope of what SEBLOD is capable of doing.

You can pass variables from Content Types to links.

regards,

Randy

15 Posts
Kleber
9 years ago
0
Level 2

Thank you.

9 years ago
0
Level 1

If I understand correctly, you want to use the Seblod form in an API approach.

The form you are talking about, will it also be accessed by 'real users' or do you only send variables through URLs and then want to save them to the DB?

In the latter case you could do a position override for that form. In that override you can place your PHP code to get the variables from the URL.

And you can use the JDatabase class to form your own SQL query for saving your variable values to any table in the DB.

Get a VIP membership