Multi-line text input validation

Hey guys,.

Can someone point me in the right direction for the validation of the multiline text.

Basically I have a scrolling text widget related to a variable. I want the person entered into several lines and do validate at the click of a button.

I know how to do this for a single line, but not too safe for multiline.

Basically, the learner must type in things like:

SELECT last_name

STAFFING

WHERE name = 'Smith ';.

(yeap its SQL and yes it needs to be formatted like that)

So, when you click the button, they get a legend of the answer. They get it is correct or incorrect.

Flash is out.

IM thinking this might be a job for javascript, but I'd like to avoid it if I can.

This is possible in JavaScript.  Here is a live demo 7 Cp SWF output:

http://captivatedev.com/demo/Cp7/multilineValidation

Here is the project of .cptx for download:

http://captivatedev.com/demo/Cp7/multilineValidation \MultiLine.zip

Here is the JavaScript code I used:

var answer = document.Captivate.cpEIGetValue('m_VarHandle.scrollText');

if(answer == '1\\r2\\r3\\r' || answer == '1\\r2\\r3'){
    document.Captivate.cpEISetValue('m_VarHandle.isCorrect', 'Correct');
} else {
    document.Captivate.cpEISetValue('m_VarHandle.isCorrect', 'Incorrect');
}

The correct answer is:

1

2

3

All on separate lines.

When the multiline text comes to JavaScript, line breaks are represented by '\r '.  However, when you put the JavaScript in the Panel of Captivate JS inside Captivate, you double escape "\\r" carriage return character  Why?  Because your JavaScript inside Captivate is interpreted at the level of the first Flash before it hits the browser (JS level).

You will also notice that I'm checking for "1\\r2\\r3" (no backspace character) AND '1\\r2\\r3\\r' (return escape character).  I found during testing that even if you press RETURN at the end and then go BACK... the return '\\r' rest character still in the end... sense even if for the end user, it seems that there is no backspace character... it really is.  It took me a while to understand this one...

Jim Leichliter

Tags: Adobe Captivate

Similar Questions

  • Captivate 4 - multi-line text input

    Hi-

    I am a learning module, and some questions are "what would you do" so there's no right or wrong answer.  I have a widget printing slides at the end, learners can print slides, as well as their replies for future reference.

    I would like more than one question per blade, because it is not classified, so I thought that it might be a widget that users can simply type text in. (instead of using the option of response/survey quiz question/short)

    Anyone can point me in the right direction or have any ideas?

    Thank you!

    Characterrific

    One thing you might try is a text entry area.  On the Options tab, select the check box to display ScrollBar.  Uncheck the box to validate the entry.  Then increase the size of the text input box to allow multiple lines of text.  The text will then end to account for multiple lines of text.  I have not tried to see how much you can enter text, but it might work for you.

    I hope this helps.

    Mister C.

  • multi-line text input

    Hey guys

    There's a text multiline/paragraph field to write something. Can someone please.

    example of

    myPanel.mytext = myPanel.add (' edittext', [0,0,100,300],"" "");




    myPanel.mytext = myPanel.add (' edittext', [0,0,100,300],"", {multiline: true} "");

    and the resource string format:

    myText: EditText {text: ", limits: [0,0,100,300], properties: {multiline: true}}

    You can view all the possible properties of edittexts (and other stuff) in ESTK > Viewer object model > ScriptUI Classes > EditText

    Xavier

  • Firefox 36.0.1 causes InfoPath 2010 multi-line text boxes do not work - how to fix?

    Since upgrading to Firefox 36.0.1, generated by InfoPath 2010/SharePoint 2010 multi-line text boxes is no longer move to the new lines when the text is entered. Like a lot of text is entered, the cursor remains on the first line.

    36 Firefox in March in favor of the white space in < textarea > style property controls for the first time. So, if the control has a white-space: pre rule, then Firefox will wrap is no longer text in version 36 +.

    Please see this thread for more information and potential code solution:

  • FormsCentral Adobe multi-line text field

    I am trying to create a form that will expand the fields of history/medical notes as indicated by the patient.  I tried incorporating fields "(multi-line) text field ', but get a field with a scroll bar, rather than a growing field.  Moving to other fields, or registration or import the file does not change the scope of expanded scroll.

    Any help appreciated.

    Many LiveCycle Designer is uninstalled when you install Acrobat 11, you must be eligible to receive the latest free version, so you can continue to use the dynamic forms designer.

  • Disorders of the multi line text area

    I work in CS3 on Mac.

    I created a text box in a dialog box with my resource editor.  Then, I used the ADMItemSuite to set the "point guy" to "kADMTextEditMultiLineType".

    When I hit the return key I eventually trigger the 'ok' button in the dialog box instead of going to the next line in the text box in that just, I was typing.  I can remedy this situation by creating a tracker for the element of text box manually adds a '\r' when the key 'kADMReturnKey' race is followed, but that substitutes the feature by clicking on / mouse of the multi-line text box selection.

    Any ideas how I can get back to go to the next line in the text box without writing my own tracker?

    Thank you

    Bill

    That I could find, the best way to do this is to create your own tracker. You don't have to manage it all just treat the return key and call Tracker by default if it is not coming back. It takes only a few lines of code.

    Why don't you create a tracker?

  • How can I increase the attack in a multi-line text box?

    Is this possible?

    I found this ad a few years where someone has asked a similar question:

    http://forums.Adobe.com/thread/286972

    This feature has never been added? If this is not the case-how can I make the code work posted in response to that post?  Just hide the lines would be a good alternative, I think. I tried to add the code to my existing PDF, but seems not to do anything, the lines are still visible when you type in the field.

    No, leading to control has been added and it probably never will be.

    The code at this other thread is not complete because the functions that it calls are not displayed. They are not integrated. Here is a link to a document with a multi-line field that behaves in this way: https://workspaces.acrobat.com/?d=AG6oZ3bi3DYHokxDPeWN7A

    There are several small scripts in various events that control the behavior.

  • How to display multi-line text in XML report?

    Hello

    I use the default style sheet that comes with TestStand 2013 (TR5_Horizontal.xsl). Some of my test steps pass multiline text to Step.Result.ReportText. I use an adapter of LabVIEW and channels are cocatenated with the constant EOL.

    Unfortunately, when I open the ATML report, the end of the line to print - multiple lines get crushed in a long series.

    How can I print multiple lines? I found a reference to RemoveIllegalCharacters in http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/report_stylesheets_deta... but may not know how to use it.

    Thanks in advance!

    Hey JKSH,

    It is a known issue with ATML5 style in 2012 TestStand sheets, and we actually created a modified version of the style sheets to implement this feature for ReportText. See this thread for more information forum: http://forums.ni.com/t5/NI-TestStand/How-do-I-get-ATML-5-00-reports-to-show-CR-and-LF/m-p/2168346#M3...

    I'm also going to attach a .zip file containing the three leaves of ATML5 updated style.

    On a side note, you're on the right track with the RemoveIllegalCharacters - basically, updated style sheets call it this function for ReportText data as it is being processed in the style sheet.

  • With scroll multi line text box

    Hello

    I need to set up a text box multi online where new channels are added and the box scrolls.  I found a previous post with a good example. However, in the example, there is a while loop using shift registers to concatenate the strings and so to add the new channel.  In my situation, I have a case statement and the new string is added to the base on an independent State.

    How to concatenate the new string with what is already in the text box?  The text box is an indicator, there is no way out for me a loop in a concantator. Is attached a picture to help describe what I'm trying to do.

    I apologize if this is a stupid question, I am very new to LabView.

    I'm using LabView 8.2

    Thank you.

    You can use a node of feedback in the middle where is your cut wire.

    You can use a shift register as well on your while loop (not shown) outside.  Simply thread through the case of false and perform the concatenation in the case of true.

  • How do you return a string multi line text?

    I try to display a string returned as lining multi instead of single coating that can be displayed on a page in Adobe Acrobat format. Var str = "" returns a single line of course. Please notify.

    This line:

    Multiline: 'true ',.

    Should be replaced by this:

    Multiline: true,

  • How can I control the line spacing in multi-line text boxes?

    Hello

    The default value for the multiline text seems to be the only space. Is it possible to change this for each (or all) text boxes?

    TIA,

    Jeff.

    Hi, Jeff.

    You can set the line-height property in the extended text properties.  In the properties panel you have your selected text field, choose the expansion icon in the lower left corner.  Then you can choose the line-height property and set to get a custom spacing.

    Hope that helps!

    -Elaine

  • Values in a dialog box application answering the multi-line text box field

    Hello

    When the user clicks on a radio button in my form a response request dialog box is displayed for the user to enter data.

    The value of the response dialog box is then added to a multiline text box.

    The script is on the mouse to the top of the radio button action and works fine the first time you click on the radio button.

    If the radio button is checked once again, the value of the response dialog box replaces the existing value in the multiline text box.

    What I need to do, is to have the response values show on a new line in the text box whenever you click on the option button.

    Can any advise please how to revise my script to work?

    Target for the field multiline text box

    var t = this.getField ("ActionAgenda");

    Response from dialog when the user clicks on the radio button

    var cResponse = app.response({)

    cQuestion: "enter your Action Agenda Item."

    ({CTitre: 'Action program'});

    Alert if you cancel

    If (cResponse == null) {}

    App.Alert ("Action point not will be not entered");

    Place the data in the dialog box in the target domain

    } else {}

    t.Valeur = cResponse;

    }

    Any help will be greatly appreciated.

    Thank you

    Change this line:
    t.Valeur = cResponse;

    To do this:
    t.Valeur += "\n" + cResponse;

  • How to scroll through the label by program which enabled multi-line text

    I am able to display the text in the label with spirals. But I need to scroll the text programmatically. I mean I want to scroll the text up/down by program.

    Please help me. Thanks in advance.

    .

    You can not scroll programmatically. But you can put inside ScrollArea TextArea and scrolling.

  • perform the action of the button method without raising of validation of text input

    Hello
    My English is not very good
    I use jdeveloper 11.1.1.3.0

    I have a button and an inputText (with validation) on the page. I set an action to the button method.
    When I click the button, the text input validation lift and method of the button does not work.
    If I put immediate = true for the button, then the validation raises, but in this case also the button method doesn't work.
    How can I run action method of the button without text input validation?

    Habib

    + 1

    the method must be called. Immediate = "true" on a circumvention of the JSF update model button so that for example submit and commit have no impact (just in case that's what you mean by method)

    Frank

  • I fill out an application online for the school. Is it possible to configure Firefox to check the spelling in a single-line text box without having to right click each time?

    I want to be able to set the spell checker to occur automatically, even for single-line text boxes.

    You can set the pref layout.spellcheckDefault to 2 on the topic: config page to perform spell checking on line and unique multi line text fields.

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

    • Use the filter at the top bar of the on: page config to more easily spot a preference.
    • Preferences that have changed see the bold (user set).
    • Preferences you can restore the default value or change via the context menu.

Maybe you are looking for

  • Satellite C650D lost ALL network connectivity

    Hi all My C650D is a little over a year old and yesterday lost the wifi and LAN connectivity. Even my modem high speed USB does not work! Flash drives plugged into the USB port still work, but Wireless does not work. I tried a wired LAN our broadband

  • Tree control double-click the default behavior

    Hi all Tree control has a default behavior that expand / reduce point when the double click event occurs on the parent element. How can I to avoid this behavior to use double custom click event without open close nodes? Thank you concerning

  • If there is no recovery... so frustrating

    I just got a HP Envy 17-j184nr. I also bought an ssd of 256 GB Samsung 850 pro to go with it. Make the recovery disks. Put in the ssd and begun the process of recovery. He was completely out the part with the administrator and the second download of

  • Display settings are lost

    Whenever the Windows Setup program is running, I restart the system, and sometimes when I go out to explore and iexplorer, the display settings on my computer are lost and come back on a blue background and no screen saver.  This has happened for the

  • ERROR: ERR_DISABLED_PRODUCT - product is disabled

    Hello in the application windows Foglight Performance Analysis for Oracle I used Shutdown StealthCollect to stop every process agent on a monitored DB instance. According to the document of the Foglight for Oracle performance analysis, processes need