After submitting a form and stay on the same page, the Form is not displayed if there are no Form Errors. Is this a custom or standard functionality? How to overcome this behaviour and force to display the form after submission?
Related
Hi all I am trying to render a second form to template without refreshing the page when I click on submit button of first form. Is there any solution for this?
I have followed this article on "How to Add Custom Action Buttons to Django Admin" https://medium.com/#hakibenita/how-to-add-custom-action-buttons-to-django-admin-8d266f5b0d41 and I have it almost working. I would like display fields that are pre-populated with values from my model.
Here is what I have so far.
From this page the user can click on the 'Approve' or 'Deny' buttons.
The deny form is simple and looks like this:
Here the user needs to type in a reason for denying and then can click the Submit button to execute custom code to process the denial.
If the user clicks Approve I would like the user to have the ability to adjust some of the values in my Command model so I need to display those values in the form. So the form would look much like the standard django admin Change form but with just a Submit button that when clicked would update the model with user's changes and call my custom code to process the approval. So the Approval form would look something like this:
But I cannot figure out how to get the values for nonroot_risk and nopasswd_risk from my model to display in the form.
Suppose I have a model for books, and a page that user can submit a form to filter books. After a user submit a form, display a result page that has a checkbox for each book, and then user can select some books(at least 1) from the result page and submit a new form.
My question is since the result page depends on the first form submitted, how can I dynamically create a varying choices on the result page?
On WFFM submit action validation is working for all the fields except reCaptcha field, though the captcha is verified but the validation message still shows the "field is mandatory" on submit as well as focus out event, and this needs to be fixed on jquery.validate.js or jquery.validate.unobstrusive.js as all our projects are using, please help
The solution for this issue require two workaround steps:
Uncheck the required checkbox for the captcha field noticing that the form will still validate this field.
Hide the required functionality for the captcha field navigate to the /sitecore/system/Modules/Web Forms for Marketers/Settings/Field Types/Complex/Captcha item and uncheck the required option - this will remove possibility to mark captcha as required in the Form Designer.
Source: http://sitecoreinfo.blogspot.co.uk/2016/11/wffm-captcha-required-field-issue_58.html
I am new to mezzanine cms. I have some questions about the form page.
In the admin interface, I added a form page. On the bottom of the form page, there is a "meta" section which I can add some fields to the form page I created. My questions are:
1) for the meta fields I added, can I save the values of the fields
in the database?
2) can the meta fields be from a database table fields? For example,
I have a user profile model, can I use the fields in the profile
model as meta fields in the form page? and how?
3) what are the purposes of the form page in mezzanine cms?
Thank you!
Mezzanine's Form page is for when you don't want to define your own model. It dynamically constructs a model to save entered data and potentially email it someplace. This is appropriate if the form is defined by a non-programmer admin or if the only purpose of the form is to collect data and send it somewhere.
However, this is probably not a good choice if the purpose is to use the data in your application. For that, it is better to define your own model and use django's ModelForm.