Enable/disable Submit and Save button conditionally in InfoPath form - infopath

I need the InfoPath form to conditionally enable/disable Submit and Save command buttons based on the InfoPath form being created or edited:
1. New Form
- Submit command enabled
- Save command disabled
2. Edit Form
- Submit command disabled
- Save command enabled
The InfoPath form is web browser enabled.

Related

gridview control update javascript not working

I have a simple asp.net gridview control on a page. The control is bound to SQLDataSource. The gridview control is set to enable editing. When I run the page on my development server the editing function works as it should, i.e. you select edit, modify a column the select update and the change is saved. When I put the page on the live server and select edit I get the edit functionality, but the Update link does not work. It would appear the page does not post back as nothing happens when the Update link is selected. The javascript embeded in the update link (Update) appears to be the same as what is embedded in the update on my dev. server. The Cancel link functionality does work.
Any thoughts on why this would not on the production server? I have another page with the same functionality and it works fine. Can't see any differences.
Thanks for any assistance.
My guess is that you don't have permissions to write to your data source. I just had this same problem and it turned out that in IIS I needed to grant write access to the appropriate folder on the server (my data source was an xml file).

unable to get data after submitting asp.net form using curl

I am trying to submit a asp form using curl request
the form is available on
http://www.fikeandfike.com/propertytax/Grundy/Inquiry.aspx
this form can only be accessed by clicking "Parcel Enquiry"
http://www.fikeandfike.com/propertytax/Grundy/MainMenu.aspx?c=32
I have written a curl script to access the for and submit the form but the output is not coming as expected.
Actually the post method is not doing anything.
I tried net modelling on firebug and found that a interim page redirects to the webpage on which data is displayed.
after executing the curl all I get is a blank screen.
is there any problem because of that interim page redirecting to final page after submit button is pressed. please help.

Need InfoPath 2010 to automatically upgrade to new template

I have a form that was created in InfoPath 2010, as an InfoPath 2003 compatible form. It has managed code behind it (C#, InfoPath 2003 object model) and it is published directly to a SharePoint 2007 form library. The form is opened from another application using XDocuments2.NewFromSolution.
I want users to automatically get the latest version of the form template, and that is what I have selected in the versioning option. However, those who are using InfoPath 2010 get a message when they open a new form after the template has been updated saying “Update Your Form” along with a button to “Save and Update Form.”
Here is what I have tried while trying to eliminate this:
Publishing as a site content type.
Publishing to a network location instead of to SharePoint.
Publishing to a network location and changing the form name (from this post http://www.infopathdev.com/forums/p/19260/66833.aspx)
Updating the version number to something totally new (like 2.0.0.1).
None of these work. This is a heavily used form and I don’t want anyone to get this Update message, especially because it makes the form not work correctly so it has to be closed and reopened. I need to figure this out before everyone is upgraded to Office 2010. It works fine in earlier versions of Office.
Does anyone have some other ideas I could try?
Thanks,
Beth
I finally contacted Microsoft support and this is what I was told:
Unfortunately there is no way to avoid the InfoPath 2010 users getting that prompt to “Save and Update Form”. Even with code it is not possible.
The users will only get the prompt the initial time to Save and Update Form as you already know, and then any subsequent openings will not prompt the users for any updates. The only way around this option is to have the InfoPath 2010 users clear their InfoPath cache first, before accessing the forms. This will delete the currently saved template information that is in their cache, so it will not prompt them to save and update the form since it doesn’t have any record of there being an open form.
The way to have users empty their InfoPath cache is by doing this:
Have them go to Start then either launch “Run” or in their “Start Search” bar (right above the Start button) have them type the following command:
InfoPath /cache clearall
(this will launch the InfoPath client on the user’s machine and they will now have empty InfoPath cache)
So I am going to make my form browser-enabled in order to avoid the Save and Update Form button.
Beth

Live cycle make a form so that it can't be changed by the end user

I created a form in LiveCycle and I want to make it so a user can edit and save the form with adobe reader. I have that part my concern is that if they have acrobat pro and Livecycle they can open the form in Acrobat pro hit the forms button and start to make changes to the form in live cycle. Is there a way to make it so that the end user can't open the file in livecycle to make changes?
Use Reader Extensions which is a service provided in Live Cycle.
You can set password protection and user permissions in designer by going to:
File -> Form Properties -> PDF Security

File uploading in AJAX updatepanel without full postback

I have a update panel, in the update panel I have fileupload control and button control, On button click, I need the file that I have upload in the fileupload control in updatepanel.
Exact scenario, I have 8 tabs on page, each tab contains too much information, One of the tab is Attachment, when user click on Add New Attachment Modal Popup shown, Modal contains detailsview in Updatepanel and in the detailsview I have fileupload control, when user hit save button, detailsview inserting event fired, In the inserting event I need the file that I have upload.
Please Note, My page is heavy and I don't want full postBack.
Does anyone have solution of this issue?
Advance thanks for your kind help.....
For solve this problem, Please see the following step.
Add ajax-upload to your detail view.
iframe-based uploader like Resource#1.
Silverlight-based & Flash-based uploader. I like this technique because it doesn't require any server-side script for display current upload status. But in HTML5, you can create this without using any web browser plug-in.
Commercial uploader like Resource#2. that use hidden iframe for uploading.
Upload file to temporary location.
System response the temporary location. Next, client keep temporary location in hidden input in detail form.
Keep temporary location with session_id. You can store it in database or Session variable depend on your framework.
When you click on the save button, the system will move the files to their real location
Note. System will automatically delete the expired file from the temporary location.
Resource
ASP.NET File Upload with Real-Time Progress Bar
ASP.NET File Upload like GMail (Commercial)
Update
After almost one year, I just found a great 3rd-parties control for this question. This is an open source plug-in of jQuery. It name Plupload that allows you to upload files using HTML5, Silverlight, Flash or normal forms and it provide some unique features such as upload progress, image resizing and chunked uploads.
You can try & test Plupload by click here.
Can't be done without co-operating binaries being installed on the client. There is no safe mechanism for an AJAX framework to read the contents of a file and therefore be able to send it to the server. The browser supports that only as a multipart form post from a file input box.
The problem is with the way the HTML file upload control works, has nothing to do with ASP.net, for the file upload control to work you need a full post of the form data. You can only simulate that your are not doing a full postback, by doing all the operation in a hidden iframe that does the actual uploading
The sites you see that do provide this functionality generally use flash or an iframe so that the postback occurs in the iframe and gives the illusion of an ajax request.
HTH
OneSHOT
I've tried swfupload (http://swfupload.org/), but do keep in mind that you have to jump through hoops if you're using forms authentication with non-IE browsers. This is apparently a flash bug, and it's not fixed in flash 10. I decided against using it in our framework because of this bug, but it was otherwise a great product.
I recommend the uploader widget from YUI. See http://developer.yahoo.com/yui/uploader/
I think you could use it to accomplish your goal. Your javascript would need to fetch the file back down to the client from the server after it completed its upload. But the page would not refresh--the upload is through flash and a hidden iframe. The download to show the file's contents to the user would be via ajax.
If the user does not "approve" the upload, then simply make another ajax call to the server to delete the file.

Resources