All fillable fields clear when I open a pdf - pdf

In my program I load and edit .pdf files. These files print with the correct data in the fillable fields just fine. However when I save them to file and open them the fields contain data momentarily and then are cleared. I'm wondering if anyone has any insight as to why this is happening. I tried looking for javascript within the files that might be causing this and can't find any. I also tried recreating the fields and altering the reset button on the form so that it wouldn't clear anything, just in case something was calling it. I have researched this for most of the day and all my efforts have been fruitless. Any help would be greatly appreciated.

The form is secured. To noodle around with that form, you'd have to contact the issuer and ask for a non-secured version.
However, the symptoms look as if it has a reset on open functionality. As you have not found anything using JavaScript, the reset is not done with JavaScript, but as an Action. And Actions can be run from the pageOpen event.

Page 1 in the additional actions (AA) dictionary has an action tree for the Page Opened event which is a reset form action. There's the culprit.

Related

react-admin pristine state after loading data via dataprovider

I've got an issue due to a timing issue with react-admin, that i'm looking for a little help on.
The situation is where user A creates a resource, and user B, on a different PC, then goes to list and edit that resource.
For user B, the list page loads the full dataset of 10 resources, then the edit page re-loads the single resource that is being edited.
However, the specific process on the edit page seems to be:
Render page
Render resource cached from the list page
Request the single resource from the API
Populate the edit form with the updated values from the API
Set the form to dirty
That last point is critical, since I have an action button that is only enabled if the form is pristine, so the user has to save any changes before triggering the action.
But in this case, the list view and the edit view seem to return the same data for the resource, so I'm not sure why the form is being set to dirty.
Any thoughts?
Regards,
Andy
This isn't a complete answer, but I hope it helps you save some time. I recently upgraded React Admin version from 3.5.3 to 3.6.0. I noticed that the Save button is now sometimes disabled unexpectedly, and inconsistently. For example, I may navigate to the edit view of a resource by clicking a link and the Save button is enabled, but if I refresh the page, the Save button is disabled. Apparently, the Save button is supposed to be disabled when the form is pristine. So between 3.5.3 and 3.6.0, it seems that some changes were made to either the pristine handling or the Save button's reaction to pristine, and it is not working consistently.
I see there is a new issue opened three days ago regarding overriding the Save button behavior, wrt pristine. https://github.com/marmelab/react-admin/issues/4913 . So, it seems the dust hasn't settled on this behavior. Perhaps a bug will be found.

Using querySaveDocument to additional information

We are trying to save some additional information with a document using the QuerySaveDocument event. However it seems that it is not being triggered at all.
<xp:executeScript script="#{javascript:setField(document1, 'cCustAddr1_fi', 'test');}">
</xp:executeScript>
This is our basic script. All the setField() method does is use replaceItemValue to try and set the field. However it seems that QuerySaveDocument is not even being triggered since we can write pretty much anything and the document will still save without problem, even if it would be impossible to execute.
We have also tried using a simple document1.getDocument().replaceItemValue() script, but again I dont think it even attempts to execute. Our documents save perfectly fine too,
Do you see any reason for this, are we doing our saving wrong, or should we be attaching data onto the document in another way?
Thanks.
Your other question on Unplugged (Using other dialog controls in iOS) suggests that you are using the Unplugged Mobile Controls project.
If that is correct then my comment above applies - the querySaveDocument event won't get fired . You can look at the code in UnpSaveDocument.xsp and possibly add your own SSJS code to that.
Alternatively, if you want an additional item created on your back-end Notes document then you should just be able to add a hidden field to the UnpFormEditor that is bound to the document1 data source and using the relevant item name you want.

SharePoint 2010 and Editform.aspx

In one of my custom application user wants to keep EditForm.aspx open once list item is created and he can keep saving the same record without redirecting user to DisplayForm.aspx page.So what I'm doing after list item creation I'm loading EditForm.aspx again.
Now the problem is when form is opened in Edit mode and if existing field is modified that doesn't gets updated in the list item but if something new added to the field then it gets saved to the list. I believe it's postback issue but not sure how to pass latest form data upon save.
If this was my task, I would create a new application page that replaces the edit page on that list.
(You can use powershell / object model to set the url of the new / edit / display pages)
Ignoring the ribbon, the edit page is actually pretty simple. It shouldn't be too difficult to create a custom one, that has the submittal behavior you are interested in. Indeed, since you are keeping the exact same field names and input types, you may be able to simply inherit the default form in yours, and simply override the post call.
I suppose it might be possible instead for you to write some javascript to hijack the submit post of the default edit page, but this seems messy to me, and I probably wouldn't go that route.
If you don't need to complete this task today, I've been meaning to push to github some code I wrote a few months ago. That code is a custom aspx edit/new/display page that is extremely easy to customize / implement. I could forward you the link tonight when I get out of work.

How do I force a page to refresh the data upon reload after entering new record

When I create a new record by submitting an .aspx page the new record is not showing up. I have to navigate away from the page and back to it for the new data to show.
How do I refresh the data up reload??
i think you need to call databind() on your grid. If that's an unlucky guess, we're going to need more context - can you please post your code (aspx and vb)
try Application.doEvents() right after you update the object in your code.
It's a shot in the dark really since we really don't know what you're code is doing, but if I ever have problems with something updating in VB.net, 9 times out of 10 calling that method fixes it.
You will need to call DataBind() on whatever object your using for your data connection, and then you will have to refresh the page unless your using AJAXified controls inside of an UpdatePanel that has a trigger set to your submit button. But without a code listing, knowing how your talking to the database, or anything of that sort, its really hard to give any code that will help.

ASP.NET Keep fileupload after postback

I'm writing an intranet ASP.NET page using VB.NET. I've run into a particularly nasty problem dealing with handling file uploads. I'll do my best to explain the problem, and perhaps someone can help.
My problem is almost a duplicate of this one, or this one, except (other than the filename) I don't care about sending the file to the server until the other data has been reviewed.
Here's the situation:
Joe Q. Dataentry inputs some data into several fields. The first 3 are drop down, and when he changes the selection, a postback event is fired that queries a database for valid entries for the other drop down selections. After selecting the values, he inputs some other data, chooses a file to accompany the data and clicks the "Update" button. When he hits the button, it fires a postback event that sends the current data to the server to be validated. The data will create a change in the database, so he is presented with a view of the current state, and what it will look like when his changes are made. He can now either confirm or cancel the operation for whatever reason.
Part of the data he will see involves the extension of the file which may be a PDF, or could also be some image file or other document.
Now here's where my problem is - on each postback event, the fileupload dialog is cleared. I was getting around it by creating a temporary file on the first postback and then renaming if he clicks OK or deleting on Cancel... but I need to do a variety of things, based on the previous state of data and the filename. I've tried to keep some session variables to retain the filename, and that works OK for just renaming the file, but for what I need to do it gets unwieldy.
What I want to do is be able to have the postback event to present the changes, and then when the user clicks "OK", submit the file. Is there any possible way to do that?
One of my thoughts was to do some of the validation client-side (I'm already re-validating server side so I'm not too worried about data security there), but I don't know how I could get the information from the database query.
Thanks for any help, and reading my slightly convoluted story/situation!
EDIT:
It appears that what I want to do is prevent a certain button from firing a full postback. Is there any way to do that?
EDIT II:
I have an update panel on the page already - is there any way for the button to only post what's in the update panel?
What you might want to do is place your drop-downs inside of an ASP.NET AJAX UpdatePanel, and keep your file upload control out of that.
Your update panel will do the post backs and allow your validation logic to happen without submitting the file, then when you hit your final "Save" button (which is also outside of your UpdatePanel) the entire form will be submitted back and you can work with your file then.