Forums

Processing form input fields before posting to jos_content

jbudd 04 Feb, 2009
I want to use a modification of your SubmitContent form to create jos_content records in a specific format.

eg the form might be

Name:
Favourite food:
Favourite drink:

and the jos_content record might be
title = My name is <name field>
introtext = My favourite food is <food field> and I like to drink <drink field>

I understand that I need to put in the form code before or after email something like
$_POST['title'] = 'My name is '.<name field>;
$_POST['introtext'] = 'My favourite food is '.<food field>.' and I like to drink '.<drink field>;

So how do I access the value of these form fields?
Max_admin 04 Feb, 2009
Hi,

here is an example :


$_POST['title'] = 'My name is '.JRequest::getVar('name field');
$_POST['introtext'] = 'My favourite food is '.JRequest::getVar('food field').' and I like to drink '.<drink field>;


Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jbudd 05 Feb, 2009
Thanks Max!

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