Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

creating a custom form


andyshep

Recommended Posts

Posted

Hi all,

 

Can someone tell me how to create a custom form using the tep_draw_form() function?

 

I need to have a select menu with 4 or 5 values, a text input , a text are and a submit button.

 

Any help appreciated.

 

or is there some documentation for this? ( cant seem to find any )

 

Cheers

Posted

Probably you're best bet is to look through catalog/includes/functions/html_output.php. That'll show you the tep_draw_form function (and tep_draw_input_filed, etc) and the parameters it takes and defaults it sets. And by looking at the function you can get a pretty good idea of the code it returns.

Like tep_draw_form:

function tep_draw_form($name, $action, $method = 'post', $parameters = '')

which takes the name of the form first, then the action, post/get, then anything else you'd like in the <form> tag like onSubmit="validateForm()".

And looking at the function you'll see that this just creates the <form ...> tag, you have to close it yourself with a </form> after your other fields.

Posted

cheers jefs.

 

thtas what ive been doing since i posted.

 

i have figured out the tep_draw_form function and the dropdown function.

im sure ill sort the rest in time. it was just time was an issue.

 

ta

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...