Forum Replies Created

Viewing 25 posts - 151 through 175 (of 199 total)
  • Author
  • in reply to: FormMaker Pro – Combo Box Export Values #6290
    Ariel
    Keymaster

    Hi Ryan,
    Excellent question!
    You’re right that this is an InDesign omission. But then, when it comes to forms, InDesign is very weak, which is exactly what FormMaker is there to help with.
    As you have found, there is no direct way of adding values to combo box items even with FormMaker.
    But there’s an excellent workaround which I will describe, which I think you’ll find is actually almost as easy.
    The trick is to use FormMaker to add a “document” Javascript to the form. Document scripts are run whenever the form is opened in Acrobat Reader.
    But even better for our purposes, document Javascripts are run when you run the FormMaker command on the form in Acrobat. Which is something you have to do anyway.
    So, what we’re going to do is to write a document Javascript that will populate ALL your combo boxes with both item names and their corresponding values. This is very easy to do, and I’ll give an example further down.
    Once you’ve added this document script in InDesign, it will be there forever (for that document) so you need only do this once (of course, you can modify it as needed if changes need to be made to the form.)
    You will then export to interactive PDF as usual and run the FormMaker command as usual. Doing so will invoke the document Javascript, and you’ll find that all the combo boxes are populated as needed.
    Now you can save the PDF and distribute it to end users.
    In fact, before saving the PDF, you might want to take one extra step – to delete the (now unneeded) document Javascript from the PDF. There’s no reason to distribute the PDF with that doc script included, since we are the ones who needed it, not the end user. (The combo boxes are already populated with items and their values, and that’s all the doc script is needed for.)

    Here’s a sample Javascript that you can tweak to add items and values to combo boxes. You might even find that it’s easier to add the items this way than to use InDesign’s slightly clunky user interface for adding one item at a time.
    The script assumes that you have an InDesign document open with 2 combo boxes in it, called “Combo Box 1” and “Combo Box 2”.

    Code:

    c = this.getField("Combo Box 1");
    c.setItems([["California", "CA"], ["Massachusetts", "MA"], ["Arizona", "AZ"]]);
    c = this.getField("Combo Box 2");
    c.setItems([["Apples", "100"], ["Pears", "200"], ["Oranges", "300"]]);

    The basic idea should be clear: We’re using the “setItems” command to add items and their values to each combo box. The items and their values are provided as a set of small 2-element arrays inside one larger array.

    I’m also attaching a PDF that shows the end result. This PDF includes the document Javascript, although, as mentioned, it makes more sense to delete it from the PDF before saving and distributing it.

    Hope that helps! If anything is unclear or if you have any other questions, post back.

    Thanks,
    Ariel

    • This reply was modified 6 months, 1 week ago by Ariel.
    in reply to: Action Javascript not visible #6245
    Ariel
    Keymaster

    I’ve just uploaded an update to FormMaker. Version 3.0.6 should now fix all these issues, and should be fully compatible with the latest versions of Mac OS, as well as continuing to be fully compatible with Windows.
    Download the latest version here https://www.id-extras.com/shopping-cart/my-account/
    Let me know if this fixes everything for you!
    Thanks,
    Ariel

    in reply to: Action Javascript not visible #6244
    Ariel
    Keymaster

    Hi AlanM and koelschbf,
    Just to confirm that this is definitely a problem in Catalina (and presumably BigSur) as well. Works fine in Mojave and on Windows.
    I will work on a fix and post back ASAP.
    Thanks for reporting this!
    Ariel

    in reply to: AutoFlowing Text to Every OTHER Page #6289
    Ariel
    Keymaster

    Thanks Daniel – very glad to hear it!
    Ariel

    in reply to: AutoFlowing Text to Every OTHER Page #6287
    Ariel
    Keymaster

    Hi Daniel,
    I don’t think it’s necessary to use primary text frames for this.
    Create a master spread with 2 pages. Add a (regular) text frame on each page of this spread. Do not thread them together, each should remain separate.
    Go to page 1 of the document (or maybe page 2, if you want facing text). It should now be possible to place your text and autoflow it as usual, and because there is already a text frame on the master page, InDesign knows to auto flow the text into that frame only, so it skips a frame.
    Does that work?
    Ariel

    in reply to: Complex Form Creation – Multiple Levels of Editability #6286
    Ariel
    Keymaster

    Right! It seems this is just the way Acrobat forms work. If “use red text” is selected, Acrobat assumes you’re wanting either red or black text only, and the option to select other colours is greyed out.
    So, if you want the text in your fields to be some colour other than black or red, you have to make sure “use red text” is deselected!
    (This is only an issue if, under the Format tab in FormMaker (or Acrobat), the formatting of the field is set to “number.”)

    in reply to: Complex Form Creation – Multiple Levels of Editability #6283
    Ariel
    Keymaster

    Hi Josh,
    You should delete that script if you’re unsure how to edit it. Then, with FormMaker in InDesign, apply the calculation that you want to field 12 again and export the interactive PDF. Does that work?
    Ariel

    in reply to: Complex Form Creation – Multiple Levels of Editability #6281
    Ariel
    Keymaster

    So, there are 2 issues I’m seeing:
    (1) In field 12 we have the same problem as I mention above in field 3. The script there is broken with that extra line break.
    If a calculation script has a major syntax error like that in an Acrobat form, it will break the entire form, because all calculation scripts in the form are run every time a value in the form changes. If one of them has a syntax error, the entire form stops working as a result.
    (2) Field 8. This has a value of “$0.32”. However, $0.32 is not a number (because of the $ sign), so field 9 cannot use it as part of a calculation. The correct way to set this up in an interactive form is to give a value of just “0.32” without the dollar sign. Then, use the formatting options in FormMaker to add the $ sign before the number, and anything else needed. In fact, you’ve done that already. Once you do that, the value is a plain number (0.32), although it will look correctly formatted – $0.32 – and the form should work.
    Hope that helps, post back if there are any other issues!
    Ariel

    in reply to: Complex Form Creation – Multiple Levels of Editability #6279
    Ariel
    Keymaster

    Thanks for sending over the PDF.
    So, in Text Field 3 there’s something funny going on. Check out the screenshot.
    The script is broken over 2 lines and things are missing.
    It should look like this:

    Code:
    // FormMaker-Calculate
    AFSimple_Calculate(“SUM”, “Text Field 2, Text Field 1”);
    //FormMaker-End

    In InDesign, select Text Field 3, delete the existing calculation, and try applying it again. Then export as interactive PDF.
    Not sure how that script got corrupted. Perhaps you played around with it in Acrobat?
    Also, the text is not appearing because it is coloured black. Have you applied a white colour to it in InDesign?

    in reply to: Complex Form Creation – Multiple Levels of Editability #6278
    Ariel
    Keymaster

    I note that “Text Field 9” does not have an underscore before the “9”, while fields 7 and 8 do. Is that correct?

    in reply to: Complex Form Creation – Multiple Levels of Editability #6277
    Ariel
    Keymaster

    Could you send me the PDF? I’ll take a look.

    in reply to: Help. Just got the Download (jsxbin) cant open #6258
    Ariel
    Keymaster

    As I see this post is getting a fair number of hits, if anyone is still wondering what to do with .jsxbin script files, here’s a good explanation with screenshots that shows how to get such scripts to work in InDesign:

    https://redokun.com/resources/install-an-indesign-script

    in reply to: Complex Form Creation – Multiple Levels of Editability #6275
    Ariel
    Keymaster

    Hi,
    So, for the first question (1): Create text fields in InDesign and type the value you want. There’s a checkbox in the Buttons and Forms panel in InDesign called “Read Only.” That will lock the field in Acrobat.
    (2) A very basic script to do division would be something like this:

    Code:
    v1 = this.getField(“Your field name goes here”).value;
    v2 = this.getField(“Another field name”).value;
    this.getField(“Third field”).value = v1/v2;

    Add that to the field called (in this example) “Third field” as a custom calculation script.
    (3) Not sure what you mean about the colour.

    Ariel

    in reply to: Mastermatic issue with front and backmatter pages #6273
    Ariel
    Keymaster

    Hi.
    Fear no degradation!
    The ‘sticky’ function is what you’re looking for, and it was designed for this in mind.
    For the main text, no need to use the sticky function, as you know. Simply apply M to all pages, and a special chapter-opener master to the first pages of each chapter.
    Next, beneath these setting (to override them, they must be beneath), set up 2 rules.
    (1) Apply your F-master to the front-matter-opener style, and check the ‘sticky’ function to make that setting stick until the next instance.
    (2) Beneath (1), again select the front-matter opening style, and this time choose the front-matter-opener master page, and make sure the sticky function is unchecked.
    This will cause all prelim pages to have the F master applied, and the prelims openers to have their own master page applied.
    That way you can have different running heads for prelims/end-matter (e.g. Introduction on both recto and verso), and for regular chapter, say Author and Book Title or whatever.
    Let me know if that works for you.
    Ariel

    in reply to: FormMagic not retaining styles #6272
    Ariel
    Keymaster

    I missed that the Arial font is different. The explanation is here (in Section 6.3 and 7), and you’ll need to use the FontList.txt feature to ensure that FormMagic uses exactly the same Arial font you’re using: https://www.id-extras.com/help/formmagic/
    (The solution you posted above may work, but I suspect only if you’re using a rich text field. If you use a plain form field (not rich text), I think you’ll still need to use FontList.txt, as above.)

    To make sure the colour carries over, don’t use tints – best to use a 100% swatch of the colour that you want.

    Ariel

    in reply to: FormMagic not retaining styles #6270
    Ariel
    Keymaster

    Hi,
    I took a look at the file, thanks for sending it over.
    So, first of all, the font is being preserved correctly as far as I can tell: In the InDesign file you’re using Arial font, and FormMagic is carrying that over to the form in Acrobat.
    The color isn’t working. There are 2 issue here, as far as I can tell. First, you’re using a gradient swatch in InDesign to create the grey. As far as I know, Acrobat does not support gradient swatches for the colour of text in form fields. Instead, create a regular RGB swatch in InDesign, with 100% tint, (interactive PDFs only support RGB, FormMagic or not) for the grey colour you would like to apply to the text. That should carry over fine with FormMagic.
    The other issue about the color is based on your screenshot: Acrobat Reader normally highlights form fields in a PDF with a blue background. This setting needs to be switched off by the user in Acrobat Reader. That’s why (in your screenshot) the grey looks black and the background a weird blue.
    Finally, regarding the line spacing, unfortunately FormMagic cannot preserve line spacing. As a workaround, instead of creating a single large text frame for all 4 form fields, separate each one into its own text frame in InDesign. This will give you full control of the line spacing.
    Hope that helps!
    Ariel

    in reply to: Incomplete vs complete URLs #6267
    Ariel
    Keymaster

    Hi,

    So, the question is how does Hyperlink Pro define an “incomplete” URL.
    It’s a bit simplistic. Any valid path (i.e., the bit after the http:// or https://) that is not preceded by a forward slash / is considered incomplete.
    So, for example, both http://www.p65warnings.ca.gov and p65warnings.ca.gov are considered incomplete.
    Since you’re adding “https://www.” you get the double www bit.
    As a workaround, before running Hyperlink Pro, search for all “www” and change it “/www”. That should ensure that those URLs are left alone by the script.
    Afterwards, remove the / before the www. (Of course, taking care that you don’t turn http://www into http:/www).

    Ariel

    in reply to: FormMagic not retaining styles #6268
    Ariel
    Keymaster

    Hi,
    Hard to say what the issue is. Could you send me the InDesign file? I’ll take a look.
    Do you have form fields on master pages? In earlier versions that was not supported so perhaps that’s the issue.
    Ariel

    in reply to: LiveIndex character style issue #6265
    Ariel
    Keymaster

    Ah, I see, I thought it was just an index.
    So, apart from creating extra character styles (e.g. italics-pagenum, bold-pagenum) and applying these to the page numbers throughout the book appropriately, and then running LiveIndex multiple time for each such character style, I’m out of ideas.
    The best solution, of course, would be an option in LiveIndex itself, say an option to find page numbers “Based on the current setup in the GREP find.”
    I’ll add that to the feature request list but can’t guarantee when it will be ready.
    If you would like a quote to add this feature urgently, send me an email.

    in reply to: LiveIndex character style issue #6263
    Ariel
    Keymaster

    Hmm, I wonder if you could use a GREP style here. Add a GREP style to the paragraph style the index uses. This GREP style could be made to target the page numbers (by searching for any digits preceded by pag.) and apply a special character style to those numbers.
    In LiveIndex, you could then target that character style.
    I think that might work, but I haven’t tried it.

    in reply to: LiveIndex character style issue #6261
    Ariel
    Keymaster

    Hi Marco,
    Glad to hear you find LiveIndex useful!
    What I would do (as a workaround) is to temporarily replace the other character style with some text styling (e.g. underline, or a special swatch or something). Then you can apply the page-number style to all the numbers and run LiveIndex.
    When you’ve finished with LiveIndex, replace the underline or swatch with your required character style again.
    Does that make sense? Let me know if I’ve misunderstood something.
    Thanks,
    Ariel

    in reply to: FormMagic/FormMaker: JavaScript-Error in InDesign #6260
    Ariel
    Keymaster

    Hi Patrick,
    Thanks for trying out the script.
    Which exact script are you referring to, FormMaker or FormMagic (or did you try both)?
    The “app.addMenuItem” error would almost certainly only be caused if you’re trying to add the FormMaker menu item. While that should work, it’s not essential for using the script, so I would avoid using it if it’s causing an error for now.
    Ariel

    in reply to: Can I make it set for one language on all documents #6259
    Ariel
    Keymaster

    Hi Andy,
    You can’t unfortunately, at this point.
    Translate remembers the settings you’ve used on a per-document basis, but it doesn’t remember them when you open a new document. Good feature request, though.
    Ariel

    in reply to: add hyperlink in Data Merge #6254
    Ariel
    Keymaster

    Yes, it probably is a feature that should have been included. You could add your request here: https://indesign.uservoice.com/forums/601021-adobe-indesign-feature-requests
    I know that Adobe do follow that list and work especially on requests that get a lot of votes.
    Oh wait, here you are! https://indesign.uservoice.com/forums/601021-adobe-indesign-feature-requests/suggestions/38815231-hyperlink-in-data-merge

    So the main point is that rather than have a text link (which is clickable in a PDF), you’d like to have that turned into a button? Could you not just add a thick underline to the hyperlink to make it look like a button?

    in reply to: Master Pages Hyperlinks to updating #6256
    Ariel
    Keymaster

    Hi ccaputo,

    Good question. Yes, there is a way to include master pages. Before running Hyperlink Pro, open the GREP Find/Change window, and make sure that the “Include Master Pages” icon is selected. (See attached screenshot.)
    Hyperlink Pro uses a GREP expression to find all hyperlinks in the document, and it is affected by all the settings in the GREP Find/Change window. For instance, you can choose not to include footnotes, or hidden layers, etc., by clicking the appropriate icon in the panel.

    HTH,
    Ariel

Viewing 25 posts - 151 through 175 (of 199 total)