Can I open some fields of gravity form inside popup? - javascript

I have gravity form like this.
I want to open dynamic fields (after selecting dropdown) inside a popup/lightbox and want to submit the form either from popup or page.
Is there any way to do that?

It sounds like you're looking for our plugin, Gravity Forms Nested Forms.
I typically would try and share a basic code example of how to do accomplish this without the plugin but there really is no simple solution here.

Related

How to populate a new windows form elements

I am trying to write a function that opens a new browser window and populate the email and login field and then click the submit button all from Javascript.
Lets say my domain is mynewweb.com and I want to open facebook.com/login page and populate the email and password fields from javascript code (such as document.getElementById) and then submit the form using some javascript code as well.
Is there any way of achieving that, any ideas. At the moment I am unable to achieve that I think its CORS issue but i'm not sure. But any idea of achieving that functionality or out of the box approach or something would be helpful.
Thanks
If I understand right, then you want a function that's not based on websites, but on browser functionality.
There are plenty of form filling plugins for different browsera, just look on their addons page.

In Salesforce open the edit screen after the object was created with Javascript button

In Salesforce, we have a button that creates events with the fields already filled out, but after the item is created I want it to reload the screen in the "Edit" view in case they want to change anything. Any ideas?
Do you need to validate fields values? Maybe it will be easier to do with field validation rules? It can be useful in cases when your data is populated not only from user screens, but also can be created in code (classes/triggers) or via API.
If you know that you exactly should to use JavaScript, you can add standard event attributes to command buttons on your Visualforce page and write JS functions for implementation of your validation logic.
I ended up creating a visualforce page with a controller and a custom button to accomplish what I needed.

Prefill an external HTML form?

I am trying to find a way to prefill an external HTML form with data and then click "Submit" using Javascript. I do not own the website that the form is on, so that makes things difficult. Is there any way to do this?
You actually can`t click other people's website using JavaScript. Maybe you can try something using an AJAX calls to send info but its out of the scope of this answer.
If you really plan to click Submit on someone's else form, you can look to headless browsers to fill this purpose. They can access the DOM and manipulate events such as click, load, etc.

JavaScript interactive form in alert box?

Is it possible to put a form into an alert box and then display that to the user? Afterwards I would want to submit the data but I presume it would work the same via a 'POST' method or such.
I had a quick play around but couldn't get it to work, not much on search engines either.
Thanks for any help!
An alert box is not editable. You can use javascript to create a new browser window with your form in it.
General form is like this: window.open('url to open','window name')
You will fall foul of popup blockers if you handle 'when' you do this badly.
This is quite a nice simple walk through with live examples http://www.pageresource.com/jscript/jwinopen.htm
You could use jQuery UI's dialog. This allows you to turn a DIV into a pop-up box.
I would recommend you jquery shadow: http://www.htmldrive.net/items/show/650/jQuery-Custom-PopUp-Window.html
Or if you want you can develop your own form (html, design, css, javascript).
If it's just a single input, you can use the built-in prompt() method.
Otherwise, you would have to pop up your own form.

html look up field

How to create an html look up field. So, I want to achieve
an html input field, with an icon/button next to it
when user click on it, a pop-up window displays with a search form (I assume this can be created beforehand and hide using javascript)
user apply search, and data is displayed in the same (pop-up) window
when user select a value and apply ok, the field value is copied to the original input filed, and pop-up window closes.
Any sample code? Is there any simple way without using any java script library? or any simple plugin for jquery.
thanks.
It would be possible, but very unwise to do this without any libraries or plug-ins.
I strongly recommend jQuery UI's Dialog widget. It's very simple, well documented and easy to use.
You will probably be interested specifically in how to use the Dialog to display a form. Click the View Source link on that page to see all of the mark-up and code required to achieve that effect.

Categories

Resources