Hi
When i now use my form it send nicely the form, with some fieldnames ,which is an number (ID).this corresponds with a fieldname which has a name in it. Due to some things i can't change directly the id send. Is it possible trough the before submit option to change the fieldname (which is now a number) in to the the data from another field that corresponds with the id ?
When i now use my form it send nicely the form, with some fieldnames ,which is an number (ID).this corresponds with a fieldname which has a name in it. Due to some things i can't change directly the id send. Is it possible trough the before submit option to change the fieldname (which is now a number) in to the the data from another field that corresponds with the id ?
Bob
can you help me on the way how it should look like? The field name in the email now is 'wedstrijd' and it gives the data from the field wedstrijd_id in the dbase. But it should give the data from the fieldname 'wedstrijdnaam'
1 beer for some good help !
can you help me on the way how it should look like? The field name in the email now is 'wedstrijd' and it gives the data from the field wedstrijd_id in the dbase. But it should give the data from the fieldname 'wedstrijdnaam'
1 beer for some good help !
Hi stefandeblock,
I'm not clear if 'westrijnaam' is in the form data or not.
If it is then you can just edit the Email template. If you need to look it up then the code would be something like this:
Bob
I'm not clear if 'westrijnaam' is in the form data or not.
If it is then you can just edit the Email template. If you need to look it up then the code would be something like this:
<?php
if ( !$mainframe->isSite() ) { return; }
$w_id = JRequest::getInt('wedstrijd', 0, 'post');
$w_naam = '';
if ( $w_id) {
$db =& JFactory::getDBO();
$query = "
SELECT `wedstrijdnaam`
FROM `#__some_table`
WHERE `wedstrijd` = '$w_id' ;
";
$db->setQuery($query);
$w_naam = $db->loadResult();
}
JRequest:;setVar('wedstrijdnaam', $w_naam);
?>
Bob
This topic is locked and no more replies can be posted.