Need script to force text entry
I have
a form that I need to require that two text fields be
user entered before they click my email send button. I am
not using a submit buttun. Is there a script that I can use to stop them if they do not enter some text in those two fields?
Set the fields that you want to force to be filled as User Entered Required (on theObject/Value tab under the TYpe dropdown). This makes the fields required. Now modify the code on your email button to do this:
if (form1.execValidate() == true){
var oDoc = event.target;
oDoc.mailDoc()
} else {
app.alert("There are mandatory fields not field yet!")
app.runtimeHighlight = true;
Where form1 is the root node (in the hierarchy of your form). In the else portion I put a message box there just to show you how it works. Note that the product will generate a default message as well. The app.runtimeHighlight will turn on the field highlighting and will mark and required field in a red border.
Paul
Similar Messages
-
Automator Help - Need script to send text to an existing document
Hi,
Automator Newbie Alert. I need help with a basic automator script. I would like to highlight some text, right click and send to an existing document. Adding the text on a new line. Is this possible?
ThanksSorry, I agree. It will update Style Library and other out of the box ones. Include the library titles in a collection and run the update against them provided these libraries are common across all sites. If not, you will have to first get an extract of
all such libraries in all sites say in a CSV file and then update the script below to refer to the CSV records.
Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction Stop;
#List of Libraries to be updated.
$Libraries = @("Shared Documents","My Document Library");
$spAssgn = Start-SPAssignment;
$site = Get-SPSite http://site -AssignmentCollection $spAssgn
#Walk through each site in the site collection
$site | Get-SPWeb -Limit ALL -AssignmentCollection $spAssgn |
ForEach-Object {
#Enumerate through all document libraries
$_.Lists|Where{$_.BaseTemplate -eq "DocumentLibrary" -and $Libraries -contains $_.Title}|Foreach-Object{
#Get the list in this site
$list = $_;
#Create a version each time you edit an item in this list (lists)
#Create major versions (document libraries)
$list.EnableVersioning = $true
#Create major and minor (draft) versions (document libraries only)
$list.EnableMinorVersions = $true
#Keep the following number of versions (lists)
#Keep the following number of major versions (document libraries)
$list.MajorVersionLimit = 7
#Keep drafts for the following number of approved versions (lists)
#Keep drafts for the following number of major versions (document libraries)
$list.MajorWithMinorVersionsLimit = 5
#Update the list
$list.Update()
Stop-SPAssignment $spAssgn;
This post is my own opinion and does not necessarily reflect the opinion or view of Slalom. -
Need script that replace text...
hello. I would like a script that prompts to input a body of text, and then replace all text on a layer with the entered text, preserving fonts, sizes, positions.. everything. If inputed text is to many letters, it chops off the exchange. If too little letters, it repeats.
Would be greatful for help.Ahh, I should have warned that the script didn't have any kind of error checking...
As you've found, if there isn't a second text item on any like, the script will choke.
It's relatively easy to work around - just wrap that part of the script in a 'try' block.
This revised version shows that, and takes care of creating the new files in a different directory on the desktop:
<pre class=command>on open theFiles
repeat with eachFile in theFiles -- loop through the files
set eachFile to eachFile as alias -- coerce each item to an alias
tell application "Finder"
if exists folder "NEW files" of desktop then -- does the folder already exist?
set theFolder to folder "NEW files" of desktop as alias -- if so, use it
else
set theFolder to (make new folder at (path to desktop) with properties {name:"NEW files"}) as alias -- otherwise, make a new folder
end if
end tell
set filename to name of (info for eachFile) -- get the file name
set fileContents to paragraphs of (read eachFile) -- read the file
set outputFile to open for access file ((theFolder as text) & "NEW " & filename) with write permission -- create the output
repeat with eachPara in fileContents -- loop through the paragraphs
set {oldDelims, AppleScript's text item delimiters} to {AppleScript's text item delimiters, tab} -- manage TIDs
try
if second text item of eachPara is "V" or second text item of eachPara is "VA1A2" then -- do we have a "V" or "VA1A2"?
set eachPara to {text item 1 of eachPara, "VA1A2A3A4"} & text items 3 through -1 of eachPara as text -- work out the new strin
end if
end try
set AppleScript's text item delimiters to oldDelims -- reset the TIDs
write eachPara & return to outputFile as text -- write out the new data
end repeat
close access outputFile -- close the file
end repeat
end open
on run
set theFile to choose file -- get a file
open {theFile} -- process it
end run</pre> -
I am trying to make sure that fields are populated with data prior to moving to the next field, but it seems that simply making the field required is not sufficient. What else must I do to enforce data entry within required fileds?
Thank you,There are a variety of scripting techniques that can be used based upon the form requirements, UI aesthetics, designer preference,... The script below forces data entry into a text field object called 'tf1' but it is a dangerous practice and should be used carefully. You may find yourself in a infinite loop based upon the tab order. A safer pattern includes global field validation upon submit.
// form1.page1.subform1.tf1::exit - (JavaScript, client)
if (this.isNull) {
xfa.host.messageBox("tf1 is a mandatory field.","Text Field 1 Error",0);
xfa.host.setFocus("form1.page1.subform1.tf1");
Steve -
Text entry boxes in CP6 - Enter key to validate input does not work in Safari?
I'm using Captivate 6 to create a step by step walkthrough of some different processes that are commonly completed in my workplace. Some of the example processes have portions where text is entered to simulate a process the end user might need. I have text entry boxes in these slides that require validation of the input to move along, with Enter used as a shortcut key. This works great in Firefox, Chrome and IE all the way down to 8....but if the course is run in Safari, the enter key does nothing. Is this a known issue?
Additional info: For many of these text entry boxes, the point is that it is a search field that has a little binoculars icon next to it that executes the search in the actual software we are simulating. For these slides I actually have the submit button associated with the text box made invisible (no fill, no stroke) and placed on top of the binoculars icon. This is an acceptable method of doing the task we're demonstrating, and just so happens to be a workaround for the enter key not working in Safari. However, a few places we have text entry that doesn't have the search/binocular icon next to it because there is a different goal on that section of the software we're visualizing. In those cases, there is no place for me to put an invisible submit button, and I can't make the submit button visible because that's not how the software we're demonstrating would work (thus defeating the purpose of the training).Sorry, this is a known bug with no fix available yet, but the makers of SwiftKey are aware of it and we will work with them to fix it: https://bugzilla.mozilla.org/show_bug.cgi?id=617298
For now, the only solution is to use a different keyboard when using Firefox. -
Text entry box character limit
I need to set a text entry so that it accepts only two
characters. This happens on any text entry box. If you continue to
type the text just scrolls to the left into oblivian. I've tried
doing this by making the text entry box small (two characters wide)
but that doesn't work. If the user types in more than two
characters the characters just scroll to the left and you can input
an endless amount of characters. I don't think there is a way to
set a limit on the number of characters in a text entry so is there
some kind of trick?
Thanks.Hi mangpark
Sorry, but there is no way I'm aware of to configure
something like that. You may wish to suggest it as a feature
request for a future Captivate version though. You may do this by
clicking
here.
Cheers... Rick -
I am in need of ai script for arcing text
i am in need of ai script for arcing text
A little vague aren't we… Is this the kind of arcing you mean? Text along a curve or do you mean distorting into an arch like some plug-in can?
#target illustrator
var doc = app.activeDocument;
doc.defaultFilled = false, doc.defaultStroked = true;
var textPath = doc.pathItems.ellipse( 0, 0, doc.width, doc.height );
textPath.pathPoints[3].selected = PathPointSelection.ANCHORPOINT;
app.cut();
doc.selection = null;
app.redraw();
var tp = doc.textFrames.pathText( doc.pathItems[0], 0, 0, TextOrientation.HORIZONTAL );
tp.textRange.paragraphAttributes.justification = Justification.CENTER;
tp.textRange.characterAttributes.size = 60;
tp.contents = 'I am in need of ai script…';
var tpd = tp.duplicate();
tpd.translate( 0, -150 );
tpd.textRange.characterAttributes.size = 90;
tpd.contents = '…for arcing text?'; -
IPhone & iPad text entry as universal app (need text to resize?)
Hi.
I'm building a universal app for the iPhone and iPad that has a login screen that needs to obviously use text input..
This all works fine, I'm developing at the iPad size and letting it auto-scale to the iPhone size (I have made allowences for the extra screen size).. only downside is, on my iPad text is the correct size during entry, but when trying to type on my iPhone it remains at the iPads text setting - which is 40 when it needs to be about 14 to fit in the text box when on the iPhone screen.
anyone tried to deal with this problem?Could you please, write here you application.xml file for the iPad (or universal iPhone/iPad ) application? I can't compile my application for wide iPad screen - it works as iPhone app (320x480).
Thanks. -
Help needed in text entry box...
hi,
I have created one assessment simulation, which has a few text entry boxes. This I have included it in another flash file. Output of that flash file is .exe and not .swf. But when I play that exe; this simulation doent allow to enter the text, while instead and exe if I play the SWF its working properly.
I want it to work in .exe as well....
Plz help....
SuajgHi,
We are creating a WBT in flash. Output of this WBT is an exe file. There are some instructions and do's n dont's where we have given this Assessment. This assessment is in swf format created in Captivate 4.
Regards,
Suajg -
Captivate: Buttons need more than 1 click & Text Entry more than one Enter keypress
Hi,
I am loading Captivate content in a Flash wrapper which is
embedded in an HTML page. Sometimes, when I enter some text in a
Text Entry field in my captivate movie and then press Enter key, it
does not register the key press in the first instance, but does it
when I do it again. Occasionally, clicks on Text Buttons are also
not registered the first time.
This behavior is not consistent, and the same files work
perfectly in other instances.
Does anyone have an idea of what could be wrong? Would
appreciate a quick response.
Thanks!
Mohsin NabiHi Mohsin,
Sounds like a focus issue. There is a variable you may want
to check out called "SeamlessTabbing". You can read more about it
here.
Setting that parameter to 'false' will (hopefully) maintain focus
within the SWF allowing you to validate the keystrokes properly. I
encountered this issue only with tabbing, but maybe there is a tab
keystroke that does work before you encounter this issue?
Let's do two scenarios for a sense of completeness:
1. Let's assume there is no way it could be a 'tab' issue
causing you to lose focus. In this case, make sure that your click
box \ text entry box appear at 0.1s into the slide they are on
(sometimes this causes issues if they are placed at 0.0). Also,
make sure they are set to do what they are intended to do like go
to the next slide or whatever.
2. If this is all started because of the tab key, try the
following: Create a text entry box on the same slide that has no
correct answers associated with it, so when you view the properties
of the box, the 'correct entries' box should be empty. Set the "On
success" to be "No Action" rather than its default "Continue". Set
the shortcut key to be Tab just like your other text entry box.
Finally, make sure the timing matches the other text entry box to a
tee. Once you have the text entry box on the slide, shrink it as
much as possible and tuck it away in a corner. Finally, make sure
that the text entry box that you type in is on the top layer of the
slide, and the other box that we just made is on the bottom. Then
again, as long as it is not in front of the text entry box you are
typing in, you will be fine.
If there is no success with these, I would recommend
implementing the seamlessTabbing variable I mentioned earlier into
your wrapper, not the individual Captivate file, to see if that
helps at all.
Give that a try and let us know how it goes!
Good luck,
HTH,
Doug -
Force user to use text entry box?
Hello,
Is there a way to require the user to enter something into the text entry box in order to proceed without just removing the forward buttons in the play bar? (That has been my trick until now.)
Thank you!
RyanHave a look at this very old blog post (but regularly consulted by lot of users):
http://lilybiri.posterous.com/where-is-null
Add a Next button, that is initially hidden and will be made visible when the entry in the TEB is no longer 'null'
Lilybiri -
Text Entry Box--Advanced Actions--Conditional Statement--Double quotes in literal input value
Hello forums,
I'm new to the forums (and Captivate in general), but I'm having a real problem carrying out a tutorial design and I think you may be my only hope. Let me explain what I want to do and the difficulty that I'm having:
I'm an instruction librarian at a university, and I'm designing an interactive tutorial for English 100 students to complete in order to become familiar with how to search the library catalog. What I've done is taken a screenshot of the catalog search page, made it the background of a slide in Captivate (vers. 6), and placed a text entry box over the search bar in the screenshot. The idea is for the students to conduct a simulated search by choosing one of three suggested search string formulations, and depending on the search string they enter, the tutorial will jump to a slide featuring a screenshot of what the actual search results would look like. The idea is to emphasize the use of keywords over full-sentence phrases, and the use of double quotation marks to enclose multi-word search terms.
So I've set the action for the TEB to "Execute Advanced Actions" and then created some IF/THEN statements in the "Advanced Actions" pop-up window (with action type set to 'conditional'). The script is such that if the student enters the first search option (how does sleep affect college students) in the TEB, the tutorial jumps to 1 slide, if they enter the second option (college students AND sleep), featuring a Boolean operator (AND), the tutorial jumps to a 2nd slide, and if they enter the third option ("college students" AND sleep) with the double quotes around "college students" and the Boolean operator, the tutorial should jump to a 3rd slide. This action script works fine for the first two input options, but I can't make it work for the third search option.
I think that it has something to do with the fact that the third input option features double quote marks, and this seems to throw off the script (I tried a quote-less input value for the third IF/THEN just to make sure that it would work jumping to the 3rd slide and it did), and I'm wondering if anyone has any suggestions as to how I can get around this issue. Again, I need it to work so that if the student enters "college students" AND sleep, with the quote marks and the Boolean operator, the tutorial will jump to a slide showing the search results if those search terms were used in a real search of the catalog.
I'd be extremely grateful for any help that anyone here can give me, we've been trying to make our online tutorials more engaging and interactive (and therefore more interesting), and I think this would be a great way to teach students about using quotes in their catalog searches.
Thank you for your time and consideration.
Andrew Wilk
College Library
UW-MadisonThe tutorial is for a "how to use catalog searching" instruction in an undergraduate library session. We use boolean operators (AND, OR, NOT) to combine search terms, ex. to search for books about the sleeping habits of college students, I would enter "college students AND sleep." Because "college students" is a multi-word phrase to describe one concept, I need to put quotation marks around the phrase to prevent the catalog from searching for the individual words separately, so the most correct search becomes ["college students" AND sleep] with quotation marks around only "college students," a user-typed "AND," and the word "sleep" (no q-marks).
A colleague of mine worked out a pretty cool (if complicated) solution that I'll share if anyone is interested. Since the q-marks where the problem, we've set it up so that the TEB validates the response for the search string with q-marks around "college students." If they enter it correctly, the tutorial jumps to the corresponding slide. The attempt # is set to 1, and if the user fails to enter the validated phrase (they misspell or use one of the other response options) then the TEB is set to run an Advanced Actions Script in which the other two options are scripted in IF/THEN statements that cause, when the term is entered correctly, the tutorial to jump to their corresponding slides. We've created another tab of IF/THEN statements that say that if the response is NOT equal to one of these response options, then the slide restarts (technically the slide "jumps" back to itself and starts over) and the user gets another chance to start the cycle over again.
I know this is confusing (I had a really hard time explaining it in words), so if anyone is interested I could make a Jing video when I have some time.
Thank you for all your suggestions -
How do I count the unique text entries in a column
I want to count thenumber of unique text entries in a column how do I do that?
Or, if you will need to do this on different documents, you can copy this script into AppleScript Editor, select the cells in whichever document you are working on, and run. No need to set up the formulas and extra column again.
SG
--select range of cells, run; provides count of distinct values
tell application "Numbers" to tell the front document to tell active sheet
set selectedTable to (the first table whose class of selection range is range)
tell selectedTable to tell the selection range
set distinctValues to {}
repeat with aCell in its cells
tell aCell
if its value is not in distinctValues then ¬
copy its value to the end of distinctValues
end tell
end repeat
return count of distinctValues
end tell
end tell
--end of script -
Text Entry Field All Caps?
Is there a way to make the text entry field show all caps as an end user types?
Thank you,
cgoebelHi Lilybiri,
When you say "after submitting", what does that mean? I need the text to show as all caps as the end user is typing...and can then retain it if the lesson requires using the Retain Text property.
And since this may be possible via JavaScript, anyone have the script to share?
Thank you,
cgoebel -
Need Script to point to a FULL SCREEN Window
Oh boy-
I'm almost there!
I just need a simple javascript that will point to the
main.php file of my web site to open in full screen. I can place
the script maybe called, "openfullscreen.js" within the root
directory of the site so it will open full screen.
I will attach the HTML that will show the "dead link", that I
would like to replace. Unfortunately, for some of you this will be
an easy task, but for me, I'm a newbie.
Thanks so much
Michael>>open in full screen
All you will accomplish with this trick is to drive people
away from your
site to never return. Users generally do not want their UI
manipulated.
Today's web is user-centric, not designer-centric. Users want
and expect
control. They do not want to have control denied as with
exploding browser
windows and Flash presentations that start automatically.
Good designers
design for the user not for their own egos.
Browser publishers recognize this and make it nearly
impossible for the web
site to manipulate the user's browser viewport. Thank
goodness! So what you
are asking is really fruitless.
Also, you have wasted a lot of time entering meta keywords.
The major search
engines quit using them years ago. Again, if you want to
build a successful
website you really have a lot of homework and research to do
first.
Good luck.
Walt
Please re-think what you are trying to accomplish. Take some
time to
understand the web and its users.
"majpix" <[email protected]> wrote in
message
news:[email protected]...
> Oh boy-
> I'm almost there!
> I just need a simple javascript that will point to the
main.php file of my
> web
> site to open in full screen. I can place the script
maybe called,
> "openfullscreen.js" within the root directory of the
site so it will open
> full
> screen.
>
> I will attach the HTML that will show the "dead link",
that I would like
> to
> replace. Unfortunately, for some of you this will be an
easy task, but for
> me,
> I'm a newbie.
>
> Thanks so much
> Michael
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html>
> <head>
> <meta http-equiv="Content-type" content="text/html;
charset=utf-8" />
> <META NAME="DESCRIPTION" CONTENT="Professional
awarding winning Michigan
> Wedding Photographer. Photographer Extraordinaire-
Eastman Kodak Company.
> Unique and
> unobstrusive approach in wedding, Bar, Bat Mitzvah
photography.">
>
> <META NAME="keywords" CONTENT="Professional wedding
photography, Master
> Photographer in Michigan, Michigan, ProSelect, Kodak,
Lecturer, Bar
> Mitzvah
> Photographer, Bat Mitzvah Photographer, Wedding
Photographer, Bloomfield
> Hills,
> Grosse Pointe,
> Rochester, Dearborn, Detroit, Birmingham, West
Bloomfield, Bar Mitzvahs,
> Bat
> Mitzvahs, unobstrusive,
> creative, unique, fine art, social events, unusual,
expensive, Kodak,
> ProShots, exciting, portrait, photojournalism,
> illustrative, Black and White, Color, leather bound
albums, Art Leather,
> Leather Craftsmen, Folios, Frames, photojournalistic,
brides,
> CPP,Certified
> Professional Photographer, Master Photographer,
Professional
> Photographers of
> America, Photographic Craftsman, Eastman Kodak Mentor,
Location Weddings,
> Location Bar Mitzvahs, Location, Bat Mitzvahs, Wedding
and Portrait
> Photographers International, grooms, engagement,
children, families,
> travel,
> Michigan Professional Photographers Association,
ProShots, Digital,
> Candid,
> Best, Detroit Professional Photographers Association,
portraits,
> Hasselblad,
> Custom, wedding album, synagogue, churches, outdoor, the
best,
> experienced,">
> <title>Michael A. Jonas Photography Unique Images
That Reflect
> YOU</title>
> <link rel="stylesheet" href="entry.css"
type="text/css" media="screen"
> title="Stylesheet" charset="utf-8" />
> <script src="extra/entry.js"
type="text/javascript"></script>
> <style type="text/css">
> <!--
> .style1 {font-size: 24px}
> .style2 {font-size: 18px}
> .style3 {font-size: 12px}
> .style8 {color: #999999}
> .style14 {font-size: 20px}
> -->
> </style>
> </head>
> <body id="main">
> <div id="logo"><h1><img
src="/Index_Images/logo.jpg" alt="Welcome to
> Michael
> A. Jonas Photography" /></h1></div>
> <div id="container">
> <div id="first">
> <h1 id="aperture_photography_of_new_yor"><a
href="javascript:;"
> onclick="openWin('main.php')"> <img
src="gallery/jonas1.jpg" border="0"
> alt="Michael A. Jonas Photography"
/></a></h1>
> </div>
>
> <div class="info">
> <h2><a href="javascript:;" class="style1"
> onclick="openWin('main.php')">
> <span class="style14">Open Site in New
Window</span><br />
> </a><a href="main.php" class="style2">Open
site in this Window</a></h2>
> <p class="style3"><span class="style8">This
site requires the</span>
> <a
> href="
http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shock
> waveFlash">Adobe Flash Player</a></p>
> <p class="style8 style3"><span
class="style8">You may also</span> <a
> href="html_index.html">view our non-flash
site</a></p>
> </div>
> </div>
>
> <div id="footer">
> <p>© 2007 Michael A Jonas Photography
• All rights reserved
> •
> Site designed by <a href="
http://bigfolio.com/">BIG
Folio</a></p>
> </div>
> </body>
> </html>
>
Maybe you are looking for
-
BizTalk published WCF service throwing HTTP 404 error using ISA reverse proxy settings
I have published my schemas as a WCF service from BizTalk 2010 "Publish WCF Service" wizard. I used Wcf-basicHTTP adapter in receive port. I am able to run the service successfully on localhost IIS and I tested my biztalk solution by sending request
-
Error Message "Service 'Apple Mobile Device' failed to start"
Tonight I tried to install the latest update for iTunes, only to get the error message "Service 'Apple Mobile Device' failed to start". I tried the installation again with my iPod connected (the only Apple device I own) and it made no difference. So
-
ADF BC with CDM Ruleframe informationals and warnings
Best experts, I have an issue regarding using ADF BC in combination with CDM-RuleFrame. We are raising different kind of messsages (errors,warnings,informationals). JHeadstart delivers an AM that raises the errors but ignores the transactions with wa
-
SCSM 2012 R2 Exchange Connector - Close an Incident in SCSM?
Hi All We have e-mails going from SCSM to 3rd party Ticketing tool called Footprints. We send New and Close e-mails to Footprints from SCSM. However I am exploring having Footprints to send its own Close emails to the Exchange Connector monitored m
-
How do I import photos from a Lightroom Catolog into Elements 7.0?
Am trying to import my photos from a Lightroom catolog and cannot. I find the Lightroom folder, but the files wont import to Elements 7.0.