Thank you very much for your responses, I think I will do using FAPI and building two forms.<br><br><div class="gmail_quote">2009/7/30 Andrew Berry <span dir="ltr"><<a href="mailto:andrewberry@sentex.net">andrewberry@sentex.net</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On 30-Jul-09, at 12:37 PM, Salvador Benimeli wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm not sure If it would be easier with CCK and views or with FAPI or I can't do that with drupal<br>
</blockquote>
<br></div>
A few options:<br>
<br>
- <a href="http://drupal.org/project/webform" target="_blank">http://drupal.org/project/webform</a> is great for creating forms which send off emails. You'd still have to write something to automatically mark and remove unpaid participants.<br>
<br>
- <a href="http://drupal.org/project/signup" target="_blank">http://drupal.org/project/signup</a> and related modules may also do what you need, possibly without any coding at all (see the list of modules on the page)<br>
<br>
- You could probably do the whole ecommerce flow (with online payment) with ubercart + cck + views + workflow modules.<br>
<br>
- You could write a form yourself as it sounds like you're all ready doing, with a second form for admins to mark payment (assuming that's your plan). Your goals sound simple enough that if you want to learn module development, this would be a good way to go. You'll probably want to read:<br>
<br>
<a href="http://api.drupal.org/api/file/developer/topics/forms_api.html/6" target="_blank">http://api.drupal.org/api/file/developer/topics/forms_api.html/6</a> (implementing the validate and submit functions for your forms, to answer your original question)<br>
<a href="http://api.drupal.org/api/function/hook_cron" target="_blank">http://api.drupal.org/api/function/hook_cron</a> (for expiring unpaid entries)<br>
<a href="http://api.drupal.org/api/function/drupal_mail" target="_blank">http://api.drupal.org/api/function/drupal_mail</a> (don't call mail() directly)<br>
<a href="http://api.drupal.org/api/function/check_plain" target="_blank">http://api.drupal.org/api/function/check_plain</a> (to ensure your site doesn't get hacked via XSS - just as important as db_query() with placeholders)<br>
<br>
Depending on how much time you have, it's probably worth playing around with a few of these options to see what fits best.<br>
<br>
HTH,<br><font color="#888888">
--Andrew</font></blockquote></div><br>