I have a box label form and it all works great but we would like to be able to automatically generate sequential box labels. So on the form we would have a [Total Boxes] form field. If the user put in "5" then on the labels we would generate a different label for each box e.g. 1 of 5, 2 of 5, 3 of 5, 4 of 5, 5 of 5. I would be happy with this happening at the time they are printed, or generating a new PDF with all the pages. Either way this needs to be a very simple process for the end user of the forms. Any ideas?
I never found a perfect solution to this in Acrobat. I decided to simply recreate the form in Excel and lock the sheet except for the fields needed and then it was easy to create multiple pages.
Related
Is it possible to add a session in cq:dialog which renders whatever data is supplied in the fields and previews it out in real time. In the simplest of scenarios, I need to add two numbers and when I enter both the numbers the cq:dialog should preview it's output as 4. There should be two sessions in the the cq:dialog, like two columns, the left one to enter value to the fields and the right to display the rendered output. How to achieve this? Is it possible to?
You can make use of "event handlers". Adobe docs has a simple example using JQuery that you can customize for your requirement.
https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html
I am trying to make a form textbox in PowerShell in which I can paste data into the first textbox and have it auto populate to several other fields when I hit Tab.
I managed to get that part working fine, but the various validation steps that those other fields normally have don't work when filled out in this way.
Here's a sample of what I am talking about:
$InputTextBox.Add_Validating(CODE SEGMENT 1)
$DescriptionTextBox.Add_Validating(CODE SEGMENT 2)
$SplitComboBox.Add_Validating(CODE SEGMENT 3)
Is there anything I can put in CODE SEGMENT 1 to trigger CODE SEGMENT 2 and CODE SEGMENT 3 to run as well? Is there another way to do this with a different approach?
Edit:
When I tab out of $inputTextBox, it splits up the input there and distributes it to the other fields with $DescriptionTextBox.Text = $Description and $SplitComboBox.SelectedItem = $Split.
When that is done though, the values entered do not trigger the contents of Add_Validating() to run.
I am building a Booking model in Rails 3.2.3 where a user steps through several form-screens of choices. If the form exactly mirrored the underlying model I know I could use a gem (e.g. Wicked gem) to build a multi-step form. The issue I am having is that on one of the form-screens there are multiple options for the user and within each of those options there are multiple options coming from an external web-service. In other words, on step 2 of the multi-step process, the form presents the user with many options of Rates from our database and for each Rate we have multiple additional options from the web-service. So a user would need to choose one of the options from the web-service (radio buttons) and then make a selection of their Rate of choice. This is then repeated multiple times on this page (although the user can only choose one radio-button option from the web-service and one Rate).
Where I am unsure of best practice is that I can display the multiple options from the web-service as radio buttons but there is a Hash of values associated with each of those options and hence with each of those radio buttons.
So, the question is, should I be attempting to pass that Hash as a param to the next step of the form process or should I be making that into an object and passing that or something else entirely!
I know this is a long explanation but I feel it's a critical point in the design of this workflow and I want to get it right.
Many thanks in advance,
J.
EDIT
Thinking it through again, the initial problem is how to represent a series of radio buttons when each radio button represents many values as opposed to say an id (in this instance each radio button represents a hash of values from the external web-service). Should the hash be made into an object and this passed instead - something along those lines?
I figured this out. On inspecting the "hash" coming back from the external web-service, I noticed that date fields were not in quotes, e.g.
:departs=>Wed, 21 Aug 2013 10:40:00 +0000
whereas all the other fields were in quotes. This made me a little suspicious. So in the end I used to_json on the returned hash:
response_hash_from_webservice = data.to_json
In the form I then used:
JSON.parse(response_hash_from_webservice).each do |nested_item|
# Access elements like so
... nested_item['company_name'] etc ...
end
However I needed to post this nested_item through to a next step of the form (as a radio button) and it only worked by again using to_json.
<%= radio_button_tag 'nested_item', nested_item.to_json %>
I could then post this value or put it in the session and on the following form page use:
require 'json'
hash = JSON.parse session[:nested_item]
And then access the values as normal:
<%= nested_item['company_name'] %>
I am using PdfSharp/Itextsharp to stitch together a number of documents and stamp a page number at the bottom of each page. The first document in the package is the Table of Contents and is not paginated. I start the pagination with the first page after ToC. The problem is the page number that is displayed on the document is not the same as the page number indicated by the Adobe Reader.
I checked with other documents and it looks like pdf supports the option to somehow reset the page number so page 1 can start again later in the document.
How can I do this with pdfsharp or itextsharp?
The page numbers shown in Adobe Reader are defined by "Page Labels".
For instance: you number the TOC with i, ii, iii, iv, v and so on. The real page numbers are 1, 2, 3, 4, 5, and so on.
Here's a Java example from my book that shows how to work with Page Labels: http://itextpdf.com/examples/iia.php?id=234 [archived] It should be very easy to adapt it for use in C#.
If not, look for the corresponding example on this site: http://kuujinbo.info/iTextInAction2Ed/index.aspx
When using the Add or Edit form from the pager I'm wondering how a simple static label can be added in the form without it creating any additional columns in it's affect on colNames[]'s and colModel[]'s. For example I have a quite simple typical Add form which opens from the pager containing a few label's and form elements: Name, Email, Web Site, etc., and then the lower section of the form has a few drop down menus containing the number 1 through 10 with the idea being to ask the user to pick a value between 1 and 10 to put a value on the importance to them about the product or service which is listed beside it. Just above this section I want to add some text only to give a brief instruction asking the user to "Choose the importance of the following products and services using the scale: [1=Low interest --- 10=Very high interest]". I cannot figure out how to get a text label inserted in the form without having to define a column with a formoption{} etc which is not needed for just some descriptive text. I know about the "bottominfo: 'some text'" for adding text to the bottom of the form but I need to insert some text similar to that mid-way (or other positions) in the form without it affecting the tabular structure of the grid. Is this even possible? TIA.
You can modify Edit or Add forms inside of afterShowForm. The ids of the form fields are like "tr_Name". There consist from "tr_" prefix and the corresponding column name.
I modified the code example from my old answer so that in the Add dialod there exist an additional line with the bold text "Additional Information:". In the "Edit" dialog (like one want in the original question) the input field for one column is disabled. You can see the example live here. I hope that a working code example can say more as a lot of words.