1
votes

I am new to drupal. And want to customize drupal registration form.In that form i have added some field from profile module. Now i want to add radio button and on submitting it should go to paypal to pay . After returning successfully user will be registered for login.

some body told me it will be done through hook. But how to create this. My problems are-- 1. two radio buttons, one is auto selected 2. on submit go to paypal and after returning successfully save in database

I am using 6.X. any help will be appreciated.

1
Please specify the version you use. Things might be done differently in 5.x than in 6.x than in 7.x. - Oswald

1 Answers

0
votes

Before going further, you may want to search if the required features is not already implemented in a contrib module.

With a hook_form_alter() implementation you can alter the registrations forms. In Drupal 6 there is two of them, one on the user/login page and the second one in the login block, so you can't use a single hook_form_FORM_ID_alter() implementation.

In your alter hook, you can add your field and add your own submit handler. Adding a submit handler allows you to redirect the user to PayPal after a successful registration. Configure Drupal to require account validation for new account. And when the user returns from PayPal, validate the account through a custom page handler.

The Pay module may probably help to handle payment processing and maybe more.