ContactForm v0.2.0 documentation
API Documentation¶
Simple contact form extension for a Flows app.
- class contactform.CaptchaForm(value=None, error=None, flow=None, option=None, checked=None, table_class='formbuild')¶
A custom FormBuild form with support for captcha fields as long as they are given the name 'captcha'.
- captcha(name, public_key, attributes=None)¶
- Name gets ignored
- contactform.config(flow, name)¶
- contactform.contactResults()¶
- contactform.make_component(name, on_new_form=<function on_new_form at 0x1869b90>, on_validation_error=<function on_validation_error at 0x1869c08>, on_valid_data=<function on_valid_data at 0x1869b18>, on_generate_form_html=<function on_generate_form_html at 0x1869aa0>, on_generate_head_html=<function on_generate_head_html at 0x1869a28>)¶
- contactform.on_generate_form_html(flow)¶
- contactform.on_generate_head_html(flow)¶
- contactform.on_new_form(flow)¶
The default handler for a on_new_form form.
Your implementation is expected to return an encoded string representing the HTML to return to the browser to display a on_new_form contact form. The flow argument has the following objects which might be of particular use:
- contactform.on_valid_data(flow, result)¶
The default handler for a successfully completed form.
Your implementation is expected to handle the contact form in some way, presumably by sending an email and then returning an encoded string representing the) HTML to return to the browser to display a on_valid_data message.
The flow argument has the following objects which might be of particular use:
- contactform.on_validation_error(flow, form)¶
The default handler for repopulating form containing errors.
Your implementation is expected to return an encoded string representing the HTML to return to the browser to display a on_new_form contact form. The flow argument has the following objects which might be of particular use:
- contactform.reCaptcha()¶
- contactform.validToPosition()¶