Infopath Send Current Form to Different Form upon Submission - infopath

I have an infopath form, is there anyway to get this current infopath form and once submit is clicked, have it go to another form or show a different set of fields upon press [submit] ?
Thanks

If what you want to achieve is some kind of multi-step form, you could use views. InfoPath Views allow to display different fields depending on the view, and you can add buttons to navigate from one view to an other. You may also evaluate some rules before switching to an other view (for example to check for mandatory fields).

Related

Make Gravity Forms Hidden Field Required?

I have a Wordpress site that uses Gravity Forms, including hidden fields which are required for proper functionality. Is there a way to make hidden fields on forms built with gravity forms required?
I will be sending out an email with a URL linking to this form which auto-populates these hidden fields. However, I'd like to make these hidden fields required, or prevent the form being submitted if these hidden fields are not set, which may happen if a user navigates to the form manually instead of navigating to it via a generated URL.
I wish to avoid the perception that the form has been submitted when it has only been submitted with partial information.
The simplest, code-free solution would be to use conditional logic to only show the submit button if your hidden fields are not empty. Here's what the settings might look like:
You can take this a step further and use the opposite conditional logic to show an HTML field with a custom message letting the user know why they can't submit the form.
a hidden form element can't be required.
elements of type hidden let web developers include data that cannot be seen or modified by users when a form is submitted.
Source
If you put a hidden value, make sure you put it with a value to be sent or make sure that before submit, via javascript you edit that value.
You can now use two CSS classes to hide your field:
"gf_hidden" or "gf_invisible"
It won't show the Validation Message if it isn't filled though, so the user may not know what is missing from the submission:
The folk at Gravity Perks have a nice page explaining it in more detail though.
https://gravitywiz.com/how-to-hide-gravity-forms-product-fields/

Many forms for editing entity on one page

I have a list of objects on my page. I need to edit an object in a popup.
There are many objects, and generating many forms for each object is not correct.
What can I do, can an iframe do in a popup?
You don't need to use iframe.
Build your form in your controller and render it in the html. The fact that it's in popup doesn't change anything. It doesn't matter if it's in popup or not, the final result will be POST call to your action.
You should have an action that renders a form, callable from an ajax in the view where you have all those entities.
Just change the entity id that will be received in the action as argument by changing the ajax url using js depending on the clicked entity you want to edit.
Then return with the ajax the form already rendered so with only one form you can edit as many entities (of the same class) as you want, without even need to render one form before they click which one they want to edit.

Conditional field using dynamic vocabularies to custom fields on ##register

I'm following collective.examples.userdata to add some custom fields on the register form.
I want to add two fields, one for state and another for city, where the second load content based on the previously selected state.
My question is how it is possible, can do this only with the schema, using dynamic vocabularies or is need to edit registration form? How can I do it?
Another issue is how to load the registration form in a portlet. Is Possible fill the ##register viewlet?
Thanks!
Use javascript to do the dynamic part of the secondary field. To render the form inside a portlet, there are a couple of ways to do it but again, using javascript might be the easiest. You have place a register button that opens a registration overlay.
Take a look at http://plone.org/products/plone.app.jquerytools for how to wire it up.

Input buttons as links?

Is their a case for using input buttons as page links, when your linking to the next of a series of pages of a form where your filling out information?
UPDATE - Ive inherited a site. One section is a series of pages of forms that users fill in. The 'next' link to the next page is currently an input button, not a normal link.
Is this bad from a standards / semantics point of view?
I am not sure what you exactly want. But what about, you can use the button to navigate through the pages. Just put the url address of the next page.
<form action="page_number_2.htm">
But you will need to store formulat data from every page. I mean, if the user fill the formular on one page and go to the next formular, you don't want to lose the data from the filled formular. You can stored them with php until the user will reach the final formular step, where he will klick submit-button.
Actually the link is used for navigation through the pages. But in this case, if I understand right, you need to send data from formular, if the user go to the next formular. So in this case, better to use button. Still you can make this button look like link.
It is possible to make links appear as buttons. However, in the situation you describe, it would be a bad idea. The form data will only be submitted to your server if you use a form. Allowing the user to click a link to go to the next page will cause you to lose all of the data they entered (Unless you are collecting that data via AJAX).
It is usually best to allow page element to perform the functions they were designed for to avoid confusing your users. Users expects links to work like links, and buttons to work like buttons.

How do you make a HTML page determine which Button to click (when you press the Enter key) without JavaScript?

I have an ASP.NET page with two sections on it... one for registration, one for login... each having a submit button.
When i'm in the login part of the page, i want the first 'submit' button to engage when 'Enter' is depressed. When in the registration part, i want the 2nd 'submit' button to engage when 'Enter is depressed.
Problem: I need the page to be accessible (i.e. i'm not allowed to use javascript)
Anyone got any ideas? :) :(
If the two submits are in different forms (and it sounds as if they should be in this instance) there is no issue. Any sane browser will take the submit button from the form you are in.
Wrap your controls in panels, then set the default button property of the panel to the desired button.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.panel.defaultbutton.aspx
They're in the same form... :(
Well, can you not change that? Unless they share fields, they shouldn't have to be in the same form. ‘login’ and ‘register’ sound like two different functions to me.
There is no pure-HTML way to specify a default submit button, much less different default buttons in different circumstances.
Including JavaScript does not in itself make your page inaccessible. As long as it still works with JavaScript off you're fine.
This should happen automatically, as long as the two forms are actually separate forms. In other words, there should be two separate <form> elements, one for login and one for registration.
Edit:
Browsers determine which submit button to "press" based on the form that has focus. If there are multiple submit buttons in a single form, which sounds like the case here, the browser will submit using the first submit button that it finds. I know of no way to get around that behavior.
You're really asking how to perform one of two actions with a single form, which kind of breaks the form model: a form is designed to perform an action (GET or POST) on a single URL. I can think of one way to work around this behavior, but it is not particularly clean.
Suggestion:
I made a crude drawing of what I'm talking about. You basically add two radio buttons to the top of the form, one for login and one for registration. Underneath those you have two fieldsets, one with fields for login and one with fields for registration. The form has a single submit button.
Click to view full size image http://img220.imageshack.us/img220/5923/boardc.th.jpg
Users without Javascript will check the appropriate radio button and fill in the appropriate set of fields. Users with Javascript have a better experience. If the login radio button is checked, hide the registration fieldset. If the registration radio button is checked, hide the login fieldset.
With proper styling, you can make it look nice. Your logic would have to check the radio button field's value to determine what action to take, but that shouldn't be too hard.
That's all I can come up with, given the single form limitation. This might not be a viable solution at all, depending on your other constraints, but it's all I've got. Good luck, and let me know if you have any questions about what I've discussed!

Resources