Hello,
I am looking to find how to create a custom input form field that will a number that is typed and added a two digit year at the front of this and at the end add a 2 char company code.
Format:
08{numbers added by end user}OR
Thanks for any help!!!
Doyle
I am looking to find how to create a custom input form field that will a number that is typed and added a two digit year at the front of this and at the end add a 2 char company code.
Format:
08{numbers added by end user}OR
Thanks for any help!!!
Doyle
Hi altnetwork,
In OnSubmit before put
Bob
In OnSubmit before put
<?php
$temp = JRequest::getString('field_name', '', 'post);
$temp = "08".$temp."OR";
JRequest::setVar('field_name', $temp, 'post');
?>
Bob
Thanks, I see how you are doing that and it makes sense.
I need to have the end user select the two digit year. Will the code below work.
field_name_year would be the two digit year from a pull down and the field_name would be the number they would enter into the field.
I need to have the end user select the two digit year. Will the code below work.
field_name_year would be the two digit year from a pull down and the field_name would be the number they would enter into the field.
<?php
$temp = JRequest::getString('field_name_year', 'field_name', 'post);
$temp = $temp."OR";
JRequest::setVar('field_name', $temp, 'post');
?>
No, it should be :
Regards,
Max
<?php
$temp = JRequest::getString('field_name_year', '', 'post).JRequest::getString('field_name', '', 'post);
$temp = $temp."OR";
JRequest::setVar('field_name', $temp, 'post');
?>
Regards,
Max
Thanks, That helped.
This topic is locked and no more replies can be posted.