Version: 0.5.81 (using KDE 4.7.3) OS: Linux It would be nice to have an option to reset a PDF form. Reproducible: Didn't try Expected Results: For example, a reset button next to the "show/hide form" button that clears all the input fields the document has. OS: Linux (x86_64) release 3.0.6-2-desktop Compiler: gcc
*** Bug 306292 has been marked as a duplicate of this bug. ***
*** Bug 354970 has been marked as a duplicate of this bug. ***
working on it
https://git.reviewboard.kde.org/r/130057/
Created attachment 110619 [details] The attachment contains a zip file with 3 patches containing the changes to 5 files: part.cpp/pageview.cpp/pageview.h/formwidget.cpp/formwidget.h These changes are done to add a button to Reset pdf forms when clicked. Changes are to the following files: * part.cpp: Just changing the text displayed to the user when the document has forms * pageview.cpp/pageview.h: add an action to reset forms just like the Show Form/Hide form (aToggleForm QAction) * formwidget.cpp/formwidger.h: add a virtual function 'clearWidgetContents()' to the parent class (FormWidgetIface) that clears the contents of the widget, then overriding this function in its children to clear the contents differently in each widget, ex. clearing the FormLineEditClass (that iherits from QLineEdit) is done by setting text to an empty string (""). * the clearWidgetContents() is called when the QAction associated with it is triggered.
Hi Ahmad, thanks for posting these patches. Could you please get an account at https://phabricator.kde.org/ and post the patches there? They are much easier to review that way. Are your patches related to the patches posted by Gilbert Assaf in Comment 4?
I have posted it here: https://phabricator.kde.org/D10504 I saw the comment now, it sounds that I have implemented almost the same idea!
Created attachment 111183 [details] Implement the reset forms option using Okular::FormFields in a way similar to editformstest.cpp I uploaded the path here: https://phabricator.kde.org/D10932 I am currently working on getting the auto test to work in a way other than creating a reset function in the document class.
I created an auto-test for this option that is working fine on the created test cases, the new test along with the implementation for this option are in this patch: https://phabricator.kde.org/D10932