Open a new Gravity Form upon form validation error - wordpress

I am looking for the best/easiest way to open/start a new gravity form when the current form fails validation. Example: user enters a zip code that is not valid upon submission. When the form fails validation a second form opens which is used to gather user contact info so they can be notified when their zip code is available.
Does anyone have an answer already to this that I was unable to find in the search or have any ideas as to a solution?
Thanks in advance.

You would have to tap into the action "gform_after_submission" and do a redirect to another page with that form. http://www.gravityhelp.com/documentation/page/Gform_after_submission
Another option would be to provide a drop down list of all the available zip codes with an additional option, like "mine is not in list". Then have some other fields that have conditional logic to only show if the "mine is not in list" value is selected.
http://www.gravityhelp.com/documentation/page/Form_Settings ( look for the conditional logic section)
Hope that helps.

Related

How to fill fields in Zoho CRM automaticly

I have this situation:
I have custom button in Zoho CRM where I want to create new Account. When I click the button, it opens page of my Zoho Creator Form, then I fill in this form and click submit. What I want to acomplish is that when I submit the form, I want some information from that form to be filled in CRM creation Account. I was thinking about using url. For example in Zoho Creator If I extend base url of my Form and finish url by e.g.?text_field=abcd when I go to that URL, the field "text_field" is filled with "abcd", but when I try to use the same mechanism, it wont work on CRM. is there any workaround?
In CRM, there is no option to fillup data on load. on the success you can write a function or using feild update you do that.
Create a function that would get called on your form submission.
Extract the values from your creator form, then do
Zoho.crm.createRecord() if you want to create record or zoho.crm.updaterecord, with update record you'll have to provide a record ID.
If you only want to create a record its pretty straightforward, read about zoho.crm.createRecord()
To answer your question it is not possible to achieve the same functionality in CRM. Although what you can try to do us use
create record using zoho.crm.createRecord
On successful creation redirect to CRM Accounts Edit page.(using /edit it depends on your CRM and the layout id's )
record is created first and than user has prefilled information
If user wants to add extra information than they can add and save the record

Contact form 7 file field related query

We have required conditional file field that depends on another dropdown field. If dropdown field value YES then file field will show and added required option but if dropdown value NO then file field not show and remove the required option.
We have done the hide show logic in file field but not able to do required option on off. Can anyone please suggest how to do that?
Without the exact website link, it is difficult to explain perfectly. However, from what I understand what you need to do here is to implement a custom validation.
You can refer this link to understand how to implement custom validation.
Basic flow of code:
1. Give ID to the drop down so that you can bind an onchange event with it
2. Bind an onchange event that hide/show the file field
3. Create custom required validation which checks your drop down value and decides whether the other field is required or not
This should do your job... Feel free to ask other questions and post your website uRL and code to get a better answer.

spring-mvc: submitting a form when a checkbox is checked

Is there a way to submit a form when a checkbox is checked in Spring MVC?
Basically I have a bunch of input box that belongs to a particular form and there is a submit button which generate run an sql and display on the same page the result. I have a checkbox to generate the result in a dowloadable excel file. When I submit the checkbox it should do a submission but a different url than the form above it?
Any help or hint will be greatly appreciated it or an url how this can be done!!
I google on the internet but couldn't find an answer to my question.
This is a use-case for the params attribute: define 2 methods in controller with different params. As a value of the params, use the name and the value of the checkbox input.
Documentation: https://docs.spring.io/spring/docs/4.3.x/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping-params-and-headers

Drupal: send output to user in form's submit handler, instead of redirecting

I have this basic Drupal scenario and question:
I have a form which accepts some input from user, and a submit handler which should process data and show the result to user. In other words, I don't write anything in database or set e variables etc., just show some output to user.
I was wondering how I can do this, because a submit handler redirects the flow to another menu item -which the form values ($form_state) are not available anymore. Redirecting form to itself is not useful, because I just receive the raw posted inputs -not processed $form_state.
How can I prevent the redirection and just show some output to user in submit handler?
Thank you.
When you are building your form you want to set re-direct to false:
$form['#redirect'] = FALSE;
There is more on redirect here: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#redirect
If I have understood your question correctly this is what you are after.

Drupal Modify Login System

I'm newbie in drupal...
I have a drupal website, and i want to extend its login system - i've been looking around the code but end up with headache.
what i wan to do is:
I want to put additional hidden form inside any login form
create a session variable that will be used on login process (after user click submit) and then destroy the session after that.
extend the login validation system inside drupal based on point 1 & 2 above - so i need to to control if my extended validation is valid (and drupal validation is valid) then go to where? otherwise then go to where?
so with that I'll have my own login system + drupal login system
Is somebody ever try this before?
fyi: I'm using drupal 6
Thank you in Advance for helping me
And
To modify the login form, you will likely need hook_form_alter() and knowledge of the Form API
You can add additional elements to the login form, including hidden fields. Hidden can either mean hidden html form elements (<input type='hidden'/>) or values that are not output in the HTML at all but are stored server side for the corresponding validate and submit functions.
You can add additional functions to $form['#validate'] to change the login criteria (whether the login is accepted or not)
You can add additional functions to $form['#submit'] (note the '#') to add operations to perform after the user's login has passed validation. The default submit handler, user_login_submit(), simply redirects the user to their account page.
You should also consider checking http://drupal.org/project/logintoboggan . Logintoboggan is a module that tweaks and changes Drupal's default login by adding a lot of features. You can see how they achieved certain functionalities by reading the code. That will help you when you write your own code.

Resources