Orbeon forms 4.8 - Autocomplete field remove value if there is space character entered on the end - autocomplete

I have a problem regarding entering values into an autocomplete field.
When a word is entered and it ends with a space, the value is removed from the field when leaving that field. The value is removed, even though it exists in autocomplete suggestions:

The autocomplete implements a "closed selection": users can only select values that are in a predefined "itemset"; they can't enter a new value. Should they try to enter a value that doesn't exist in the itemset, upon leaving the field, that value is removed, to make it clear to users that the value wasn't accepted.
Case and spacing matters, so if users enter a value with an additional space at the end, it is considered to be a different value, and thus, on leaving the field, it is removed, which explains the behavior you're seeing.

Related

Remove spaces from multi select checkbox in mail body

I have a powermail form in which I use a select box with multi selection.
In the email body the selected values are written as a comma separated list but with a space after each comma.
The developer of powermail (powermail 7.4.2 / TYPO3 9.5) has given me an answer on github: https://github.com/einpraegsam/powermail/issues/680
He directed me to an hardcoded entry in the answer.php of powermail.
I've changes the line in the answer.php to my needs but the spaces in the e-mail remain.
Can anyone give me a tip how to remove these spaces in the mail body for the multi select value list?
First question after code changes:
have you cleared all caches?
Then you need to verify that this line of code is responsible for your spaces. change the default delimiter to something new (like: '#').
Differentiate between the default value of this function and the value which is transmitted when the function is called. You could change the default value, but if the function is called with the old value it will override the changed default.
If that doesn't help you need to debug where your values got concatenated. That could be in FLUID, Typoscript or PHP.

Mail merge with check box form field

I am looking for a way to set a checkbox field to checked via a mail merge. I would like to avoid using a macro if possible. The document I was provided has a check box form field with a bookmark named "SUBMIT". Is there a way to pass in data (CSV file) that will cause the checkbox to be checked? Perhaps a data field named SUBMIT whose value is true, etc?
If that is not doable, I was considering just passing an "X" or some character that represents a check mark and overlaying the field.
Yes, this should be doable using field codes. You can have an IF field display a font symbol or a graphic for True / False based on the content of a field in the mail merge data source.
For the sake of discussion, let's say the field name in the data source is "Submit". Insert a pair of field brackets by pressing Ctrl+F9 and create the IF field structure, inserting the MergeField from the mergefield list:
{ IF { MergeField "Submit" } = 0 "" "" }
Note that I'm checking for "false" because this value is predictably 0, while True might be 1 or -1.
Now position the cursor between the first pair of double-quotes and insert the "not checked" graphic or symbol. For example, you could use Word's Insert/Symbol dialog box to insert a WingDings box. Repeat for the "checked" box, using a checked symbol or graphic.
Alt+F9 to toggle the field codes back to display and test.

How to increase visual length of form text field in Word?

When a form text field is inserted in a Word document, the grey shaded length is about 5 characters long. How can this length be increased?
Allthough it is a rather crude measure (and I don't recommend it), you can set "Properties -> Default Text" to as many blanks as you want the size. But this comes for a price: as long as you move into the field by pressing TAB, all blanks are selected and get typed over. When you use the mouse, you click the cursor anywhere into the field and start typing ... so your entry might be pre and post fixed by a number of blanks that you have to trim away in e.g. an exit macro.
I recommend old form fields as the last resort (i.e. there must be a good reason to use them) and would prefer (in that order)
native Word2010/2007 fields (text or Rich text - perhaps not backwords compatible)
legacy ActiveX fields (compatible with W2003)
Legacy (old) form fields

How to do search and replace involving fields in Microsoft Word?

I have a Word document with fields of the reference variety, which occur in the form "[field].[field]"--in other words, there's a period between the two fields. I want to globally replace this with a space.
Word offers the ^d special character to search for fields, but for some reason the query "^d.^d" does not find anything. However, ".^d" does. Now comes the problem, however--what do I specify as the replacement text in order to retain the field code? If using regular expressions, I could use a "Find What Expression" such as \1, but with regexp ("wild card") mode the ^d is not permitted.
I guess I could write a macro...
I would like to add to Bibadia's solution.
An example of an index entry field; we want to change a name we misspelled.
Make sure hidden formatting is displayed (toggle with SHIFT+CTRL+F8).
Make sure wildcards option is not selected. To search for fields, use the opening and closing field braces code (optionally use ^w for spaces, as Bibadia suggested):^19 XE "Deo, John" ^21
Replace won't recognize field braces character, but will allow to insert the clipboard's content. ;). To do that, insert in text the correct entry. CTRL+F9 to insert field and type:XE "Doe, John"
Select the field above and copy
Use ^c in the replace box
Hit Replace All
Ta-da!
It's usually better to go the macro route when finding fields because, as you say, the find algorithm that Word uses doesn't work the way you might hope with fields.
But if you know exactly what the fields contain, you can specify a search pattern that will probably work (however not in wildcard mode).
For example, if you want to look for figure number field pairs such as
{ STYLEREF 1 \s }.{ SEQ Figure \* ARABIC \s 1 }
(which would typically be the same set of fields everywhere in the document)
If you only really need to look for the following:
{ STYLEREF 1 \s }.<any field>
you could ensure that field codes are displayed and search for
^d STYLEREF 1 \s ^21.^d
or
^19 STYLEREF 1 \s ^21.^19
If you need to be more precise, you can spell out the second field as well.
"^d" only works for finding the field beginning, not the field end.
It's a shame that ^w wants to find at least 1 whitespace character because otherwise it would be more robust to look for
^19^wSTYLEREF^w1^w\s^w^21.^19
Perhaps someone else knows how to work around that without using wildcards?
Torzaburo,
I suggest that you do this using a macro. You can start by recording the macro, and later refining your processing steps within the macro.
First turn on the hidden characters by navigating to Home > Paragraph > toggle the show/hide Paragraph symbol. Also, select all and toggle the field codes on (right-click and select "Toggle Field Codes".
Open a new blank Word doc in addition to the one you have open. You will use this later. Start the macro recording and find the field using the "^d" (field code) as you said.
When the field is found, copy only the field text within the brackets, and not the full field reference. While the macro is still recording, ALT + TAB to the new blank document and paste the field code in as plain text.
At this point, do the necessary find & replace processing to the field codes. Highlight the processed field codes, copy, ALT + TAB back to the original document, and paste back between the { } brackets.
Stop the macro recording. Add any further custom processing to the macro VBA.
Select-All and re-toggle the field codes. Update the field codes.
You don't need a macro. Just toggle all field codes on by using Alt+F9. Then do a find and replace for what you want to change. Once the replacement is complete, use Alt+F9 again to toggle the field codes back off.
Disclaimer: I didn't originate this solution, but it's clean and elegant and I thought it should be included here:
(Adapted from Search & Replace Field Codes in Word):
Create or find a single instance of the field you want to convert text to
Toggle Field Codes visible (AltF9)
Copy the code for the field you want to use to the Clipboard (highlight and CtrlC)
Open the Replace dialog box (CtrlH), insert the text you want to replace in the Find What box and then enter ^c in the Replace With box.
This will replace your text with the contents of the Clipboard, turning it into the field code you copied in step 3. It also copies formatting information (font, color, etc.), to control how the field will appear when hidden. (Caveat: I've tested this with Word 2003 under Windows 7 only.)
Coming in late on this, probably way too late for Beth (sorry Beth). And this may not be quite what Beth was looking for. But for anyone interested ...
It sounds like Beth may have created captions throughout the document using INSERT CAPTION (hence the presence of field codes). This means these captions will have been (automatically) created in CAPTION style.
To globally replace the separator "." with " " (space) in such captions, take two steps:
[1] Go to REFERENCES | INSERT CAPTION, then click on NUMBERING and replace the SEPARATOR "." with "EM-DASH". This will replace all separators in captions for the selected label in the CAPTION Window. If you have other labels in use in the document (e.g. FIGURE), select the other labels one by one and repeat this process.
[2] Do a find/replace searching for special character "em-dash" (^+) in style CAPTION, replacing with " ". Click REPLACE ALL.
Voila!
NOTE: This presumes that em-dash does not appear in the caption text anywhere. If it does, then you'll need to do a pre- and post- "fiddle" to ensure these em-dashes are not touched by the global replace above.
The "pre-fiddle" is to do a global find/replace across captions, replacing the em-dash ("^+") with some other string (e.g. "EM-DASH") that doesn't ever occur in any caption's text. Then you do the separator change as described above. Finally, the "post-fiddle" is to restore the em-dashes that were in the captions, by doing a global replace of the string "EM-DASH" with the actual em-dash character "^+".

Why is the enter key behaving like the tab key?

I have a "search" layout, which has several object boxes for the user to type in search queries. I have Set Tab Order... which works great. However, rather confusingly, pressing enter/return also has the same effect as pressing tab.
I have looked in the Inspector > Go to next object using and see that both the return and enter are unchecked.
What/where else could be causing this behaviour? Ideally I would like the return/enter key to perform a script/act like a button, is this possible?
Note: I am in Find Mode.
If there's no script trigger, try to double check that the enter/return is really off for the field in question. Maybe there are two or more fields stacked on top of each other (sometimes developers do that) and you checked the wrong one.
I was having the same issue. I checked the fields and there were no hidden scripts, triggers, conditional formatting or anything like that; however, the fields were either a drop-down list or a drop-down calendar so after selecting the criteria, the cursor would go to the next field.
I noticed that if I enter the finding criteria and double click the same field (to avoid going to any other field) and then click the return or enter keys, it works. So stay in the field when you click return or enter and it will perform the find.
Are you positive that you're in find mode when you're doing this? The default behavior in find mode is that the return key executes the find.
If the field you've selected has a dropdown list then CLICKING ON IT ONCE will bring the list down but not place the cursor in the field. Selecting the field a second time will place the cursor in the field. Once the cursor is actually visible in the field you will find that the TAB key works as you expect.
Otherwise, with the dropdown list down and the cursor not in the field, the RETURN key will move to the next field when in Find mode. This default behaviour sort of makes sense to me because the RETURN key can't act on the field until the cursor is actually in the field.
I had the same problem as you and it stumped me for a while too.