コード例 #1
0
    def setUp(self):

        home_page = Page.objects.get(url_path="/home/")
        form_page = home_page.add_child(
            instance=FormPageWithCustomFormBuilder(
                title="Support Request",
                slug="support-request",
                to_address="*****@*****.**",
                from_address="*****@*****.**",
                subject="Support Request Submitted",
            )
        )
        ExtendedFormField.objects.create(
            page=form_page,
            sort_order=1,
            label="Name",
            field_type="singleline",  # singleline field will be max_length 120
            required=True,
        )
        ExtendedFormField.objects.create(
            page=form_page,
            sort_order=1,
            label="Device IP Address",
            field_type="ipaddress",
            required=True,
        )
コード例 #2
0
    def setUp(self):
        # Create a form page
        home_page = Page.objects.get(url_path="/home/")

        self.form_page = home_page.add_child(
            instance=FormPageWithCustomFormBuilder(
                title="Richiesta Gelato",
                slug="ice-cream-request",
                to_address="*****@*****.**",
                from_address="*****@*****.**",
                subject="Gelato in arrivo",
            ))
コード例 #3
0
    def setUp(self):
        # Create a form page
        home_page = Page.objects.get(url_path="/home/")

        self.form_page = home_page.add_child(
            instance=FormPageWithCustomFormBuilder(
                title="IT Support Request",
                slug="it-support-request",
                to_address="*****@*****.**",
                from_address="*****@*****.**",
                subject="Support Request Submitted",
            ))
        ExtendedFormField.objects.create(
            page=self.form_page,
            sort_order=1,
            label="Name",
            field_type="singleline",
            required=True,
        )