Conditional Text boxes

I am attempting to add a conditional text box on a form on my website.  For example, if the user answers "No" to an item, I would like for an additional text box to appear to allow the user to enter comments for selecting no.  My forms then are sent to a mailbox for processing, so I would need to be able to have this information be able to be sent to with the email as well.  Is this possible?
I am also looking for code that would allow me to enter additional line items on a form.  So for example my form has a base of 5 lines for the user to enter data into.  Sometimes they may need more than 5 lines, I would like for them to be able to click a button to add additional lines.  I would need for these additional lines.
Thanks
Jeff

Hi jeff
For
I am also looking for code that would allow me to enter additional line items on a form.  So for example my form has a base of 5 lines for the user to enter data into.  Sometimes they may need more than 5 lines, I would like for them to be able to click a button to add additional lines.  I would need for these additional lines."
you can tweak the follwing code and use it as appropriate
<script type="text/javascript" language="javascript">
function txtenlarge()
document.getElementById("txtin").rows = 10;
</script>
<form action="test.cfm" name="testform">
<textarea rows="5" name="txtin" id="txtin"></textarea>
<input type="button" onclick="txtenlarge()" />
</form>

Similar Messages

  • Text box not empty conditional statement

    I've been asked to develop a survey and, in several places, a
    score is given for the completion of text box. However, if there is
    no text in the box, then a score of zero should be given.
    I thought the best way to do this would be to use a hidden
    field with a conditional statement saying "if text box is not empty
    then score=4, else score=0.
    However, firstly I'm not sure how to write this and secondly,
    how do you check if a text box is empty?
    I think it really calls for some human input but the client
    is quite sure this is how he wants it.
    The scores are all going to be inserted into a mysql database
    and sorted out there, so there may be some fudge available there
    but if php could do something nice in the code, that would be
    preferable.
    Thanks in advance.
    Andrew

    Drewbles wrote:
    > However, firstly I'm not sure how to write this and
    secondly, how do you check
    > if a text box is empty?
    Believe it or not, with the PHP function called empty();
    http://docs.php.net/manual/en/function.empty.php
    if (empty($_POST['fieldName'])) {
    // give a score of 0
    } else {
    // give a positive score
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS3" (friends of
    ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • How to set up rules/conditions on a drop down box to ensure its been filled if a value in a text box is selected.

    Hi, I am in midst of creating a form in infopath. I have a text box field in which the user will enter the number of issues he has. if the user has entered the number of issues he has, then he will need to select the type of issues from a multi selection
    box. Thus i need to know how to set up rules/conditions to ensure that the user has to complete the multi selection box if he enters a value in text box for the number of issues. 

    I assume what you are asking is to make multi selection box as mandatory. If not please explain with a example
    Try below:
    http://webcache.googleusercontent.com/search?q=cache:ItIYeZ8K2gEJ:sharepointkings.blogspot.com/2013/06/make-multi-select-list-box-required-in.html+&cd=4&hl=en&ct=clnk&gl=in&client=firefox-beta
    If this helped you resolve your issue, please mark it Answered

  • Access 2010 - If Then Else Statement to display text within text box upon Check Box True/False condition

    I have a form called myForm. On this form is a check box called myCheckBox. I also have a text box labeled myTextBox. I have assigned a macro, myMacro, to run upon selection/click of myCheckBox. The macro is an If statement which determines if myCheckBox
    is checked or not checked and spits out a value, "Yes" or "No" for example, into the text box.
    I am not able to get text to display into the text box although I am not receiving any errors when I run the macro. This may be a fault in my logic and would like help resolving where the problem lies. I am fairly new to Access so this could be something
    simple.
    My code is as follows:
    If Forms!myForm =  True Then
      Forms!myForm!myTextBox.Value = "Yes!"
    ElseIf Forms!myForm = False Then
      Forms!myForm!myTextBox.Value = "No!"
    Else
      Forms!myForm!myTextBox.Value = " / ERROR / " 
    End if
    Thanks!

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, the issue is more related to coding/programing, you'd better post your question to the MSDN forum for Access
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=accessdev&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Comparing text box with empty string

    Here is the procedure how to do it - but it does not work for me.
    http://blogs.adobe.com/captivate/2010/12/few-tips-on-%E2%80%98advanced-actions%E2%80%99.ht ml
    Could someone please confirm if the procedure mentioned in the blog is working or not, and if it's working, then what did I mess up in the first case below?
    In summary, I created a variable stringEmpty and created Advanced Action with condition associated with a button. I also created variable varUserName and associated it with a text box.
    There are 3 cases and 3 different behaviours.
    First case:
    stringEmpty =
    advanced action condition: varUserName; not equal to; stringEmpty (variable)
    After clicking the button, the result is as if the condition was always false (i.e. as if the string in the text box was always equal to stringEmpty)
    Second case:
    stringEmpty = aaa
    advanced action condition: varUserName; not equal to; stringEmpty (variable)
    After clicking the button, the condition is met when user enters "bbbbbbb" (which is OK). However, if he does not enter anything, only clicks the button, the condition is not met (which is incorrect behaviour, because "" <> "aaa" so the condition is met)
    Third case:
    advanced action condition: varUserName; not equal to; cccc (literal)
    In the third case all is OK.

    Hello,
    Each entry in a TEB has to be confirmed before it will get into the variable associated with it. This can be done with the Submit button or you can assign a shortcut key to it or use both. So I would really recommend to check if the variable is populated before you trigger your advanced action. You can do that by inserting temporarily a Text Caption that shows this user variable. Working with 2 TEB's on a slide: I tried to explain the workflow in another blog post:
    One submit button for multiple Text Entry Boxes
    To check if somewhere a scored object has been slipping in: check the Advanced Interaction view (F9)  which gives you an overview of all scored things.
    Lilybiri

  • Text Box Entry Validation

    We have a program that once a user enters a character the cursor jumps to the next entry box, they do not have to press Enter.  For example, we want the learner to type in the character 'H' for Home or 'B' for Business (or 'h' or 'b') for the type of phone number they are about to input.  So as soon as they type in 'H', it immediatly takes them to the number entry box.  But using a text box entry, the learner has to hit the Enter Key for a validation to take place.  Is there a way for the validation to occure after the keystroke?  We've played with the shortcut key, but that will only validate one of the four options...and we need it to validate H, B, h, and b.  Is there a way to do this with Advanced Actions?  Any help is appreciated.  We are using Cp 6.

    You can replace the validation by a conditional action, have showed that several times on my blog. And then you can check for more than one entry, but this is also possible with the HUD that allows you to enter several correct answers. But every action has to be triggered by an event, so this wouldn't help you because entering a character cannot be considered as an event.
    Lilybiri

  • Fetching data from a table and displaying it on the text box

    Hi,
    I have created a dialog program in which created a container(text box)  to enter data upto 1000 characters.
    Iam capturing the data and storing it in a custom table. In PBO I want to fetch data from my custom table (if data is already present :1000 characters data) and display it on screen.
    Please let me know how do i do it?

    hii Pavani,
    declare this two sttements in Screen
    MODULE STATUS_DATA.
    MODULE SELECT_DATA.
    In PBO, Under SELECT_DATA write Select query like:
    (considering the DB field to be text and Screen Field to be SC_TEXT)
    select text from <DB Table> into SC_TEXT where <condition>.
    *note if u r selecting more than one field than write fields in (   ),eg. (f1....f2) )
    Plz let me know for  any further queries.
    Regards,
    Apoorv

  • How to change the color in text box item.

    Hi,
    There is a text box where i am returing the value using item source SQL and Always replacing.
    I have a condition like this if value is > 10 value must appear in red else white.
    Eg:
    select
    case
    when TO_NUMBER(:P122_PRJ_SV_PROJECT_USL) > TO_NUMBER(:P122_GSD_SV_PROJECT_USL) then
    '<span style="background-color:RED">'|| PO.EV_UCL || '</span>'
    else
    '<span style="background-color:WHITE">'|| PO.EV_UCL || '</span>'
    end
    from projects po
    this is not working please suggest me how to change.
    Thanks
    Sudhir.

    Sudhir
    Please repost your source code with {noformat}{noformat} (with the curly brackets and in lower case) above and below it.
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                   

  • Very slow PDF generation when conditional text is hidden in FM 9.0

    I am working on 96-page chapter of a larger book. A 7-page section of the chapter needs to be hidden until the next release, so I hid it with conditional text. After doing this, the "Save as PDF" printing process goes from taking 6-7 seconds to taking several minutes. If I unhide the conditional text in the same session, printing is very quick again.
    I have no problem generating very PDF files with the PDF printer in other applications (Word, PowerPoint). The issue is specific to FrameMaker and the use of conditional text. What might be causing this?
    I am using FrameMaker 9.0p255 and Distiller 9.0.
    - Chris

    Hi Jeff,
    These were good suggestions to try. Saving the document first has no effect on PDF generation.
    However, I did find that printing to the Adobe PDF printer remains fast when the conditional text is hidden. That's quite an interesting finding! I did also notice that these two methods of PDF generation aren't identical:
    "Save as PDF" opens an Adobe Distiller window, while printing to the Adobe PDF printer opens a different "Creating Adobe PDF" progress box (looks like it's from the printer driver itself).
    "Save as PDF" generates a 1188k PDF file, while printing to the Adobe PDF printer generates a 1049k PDF file.
    "Save as PDF" defaults to placing the PDF in FrameMaker's working directory, while printing to the Adobe PDF printer defaults to saving to the last place to saved a printed PDF file (awkward when working with multiple directories, as I often do).
    When I do a "Save as PDF", FrameMaker does still spool to the PDF printer. It is this spooling that takes a long time. Once spooling is complete, then the Distiller window opens and the PDF is created very quickly.
    I would still like to get "Save as PDF" working since it knows where to place the PDF file. No solution to the runtime yet, but at least there is progress...

  • Multiple Text Boxes on 1 Slide...

    There have been a lot of threads about this, but I've been unable to find an answer to the specific situation a colleague is facing.
    We are simulating a mainframe system where the user enters multiple values, then presses enter.  The client wants the simulation to replicate the system as closely as possible, and therefore we would like the user to Tab between the fields.  After the last field is complete, the user should press Enter to move forward.
    I can't get the text boxes to validate upon exit/lose focus...
    In the screen shot below, the text boxes are highlighted for the sake of this thread.  The yellow boxes have shortcuts of "Tab". The last text box (highlighted in purple)  has a shortcut of "Enter".    My hope was that, if a yellow box was not correct, when the user pressed  tab, they'd receive the failure caption, but this has proved wholly  unreliable.  Sometimes it won't appear at all, sometimes the failure caption for a different yellow-shaded text box appears.
    The text boxes don't seem to validate in any discernable order (not by the order they are in the timeline, not by reverse order in the timeline, not by the order they focus when the user presses tab).  I've tried putting an advanced action on the last text box which should check each text box variable against its correct entry and only move forward if each are correct.  This didn't work at all, it would still allow the user to move forward.  I've tried setting it up so that each text box appears after the pause of the previous text box...  I've tried setting the "on complete -> show -> next text box" (maybe I'm missing some key component of this method, 'cause I couldn't get the target to display on this at all)...
    Thanks in advance- I could use any clues you have!

    Hello,
    I thought you wanted one Advanced action in which you will check the entries in all the TEB's (stored in user variables)? Do you think the 'focus lost' event is a good idea to trigger that since you are not sure that it will happen? And if you use the Submit from the 'last' TEB (that can be doubled as a shortcut), this means that you are imposing the sequence, not, you will have to be sure that this one will be the last TEB to be entered? Or do you want an advanced action that will be triggered by all 'focus lost' events and by all the Submit's?
    What do you mean exactly by multiple custom scripts? Perhaps my lack of knowledge of English is puzzling me? You can trigger only one advanced action with an event, but this action can have a multitude of condtional actions, an unlimited sequence of standard actions and even combinations of standard and conditional actions (as I have been describing in the articles I did mention). If you are thinking about something else, please try to explain by giving more details.
    Lilybiri

  • Linking text boxes together?

    hello,
    I work with a book (.indb) with many different Documetns linked in it(.indd)
    Problem is that i have a lot of textboxes that are the same in the documents and also across the documents.
    What i would like to do is to link them all together somehow and either have
    -one master (if i make changes in that it applies to all of them)
    or
    -everyone as a master, i make changes anywhere and all of them get changed
    best would be though
    -i have one master wich changes all of them but i can have extra text in the individual textboxes if needed. (I could solve this by just doing extra textbox n the pages i need some extra text)
    Also dont know if it matters but the text in the textbox is conditional text (shouldnt make a difference  think)
    So what i want to know is if you can do this and if so, how you do it.
    Thank you in advance
    /Simon

    SimonSchneider wrote:
    Thank you for the quick reply,
    So there is no way of linking text boxes together?
    Becouse i only have a small amount of text that has to be the same on certain pages.
    So i cant put it inot master page and i dont really want to place an entire page,
    I hope I understood the procedure correctly.
    Thank you in advance
    Consider cross-references. Each cross-reference brings in a whole paragraph, to another place in the same document, or from a separate document. The source content can be in a separate document that's one of those in an InDesign book, or one that's not in a book. Cross-reference source content and the source that's captured can both be conditionalized, though, hiding the source creates unresolved references.
    Changing the source content changes all instances that capture it.
    Search Google for terms like "InDesign cross-reference tutorial" without quotes for details.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices    

  • How to Create A Conditionally-Texted Paragraph Element

    I'm creating a multi-purposed document where I need to add a section of conditional text on each page, but not always in the same place on the page (so I don't think a Master Page solution would work). Rather than have to select the text and manually apply the condition each time, I would like to create a paragraph tag that is already defined with that condition so my users can just select that tag and enter the text. The paragraph designer doesn't provide the ability to specify a condition text setting for newly created paragraphs.  I tried creating  a new reference page and adding a conditionally-texted text box within a graphics frame, and then specifying that for the Below Pgf setting for a new paragraph element, but it just imports the graphic frame from the reference page and the text within cannot be editing.
    Suggestions?
    Thanks

    I would create a unique paragraph tag and then apply a conditional
    text setting to all tags of that type with a FrameScript.
    An alternative may be to set up a paragraph tag with the conditional
    text settings already applied and then copy-and-insert it with a third
    party tool such as ClipMate or Autotext, but I don't know that the
    conditional text setting is "sticky" when processed through a
    third-party solution. You'd have to test it a bit.
    Art
    Art Campbell
                   [email protected]
      "... In my opinion, there's nothing in this world beats a '52
    Vincent and a redheaded girl." -- Richard Thompson
                                                          No disclaimers apply.
                                                                   DoD 358

  • How to get the text boxes and select lists dynamically?

    Hi,
    I have a requirement such that I need to create the text boxes and select lists depending on the user input at the run time. It means that if the user requires four text boxes/select lists then I need to have 4 such thing. If the user need 6 then I need to have 6.
    The design may be such that initially only one text box/select list will be available when the page launches. Then as ad when the user asks for more those will be available to the user accordingly.
    regards,
    Dipankar.

    You can use Ajax to call textboxes and select list based on what user enters.
    Otherwise make those items conditional and based on what user enters you can display textbox or select list.
    You can call Single Textbox and Select List using Ajax for any number of conditions.
    Regards
    Chandra

  • Coding in Smartform inside a Text Box

    Hi All,
    Whether this code is correct inside a text box in a Smartform ?
    :/ IF &GS_NAME1& <> ''.
    <T2>&GS_NAME1&</>
    ENDIF.
    :/ IF &GS_NAME2& <> ''.
    <T2>&GS_NAME2&</>
    :/ ENDIF.
    Thanks in Advance ,
    Vivek K ..

    You cannot use IF statements inside the smartforms text nodes.
    In you case, you need to create two text nodes.
    one to print <T2>&GS_NAME1&</>, in the condition tabs update the condition with field name GS_NAME1 and select <> option on Operartor column and value as Inital for the comparison.
    Second to print <T2>&GS_NAME2&</>, in the condition tabs update the condition with field name GS_NAME2 and select <> option on Operartor column and value as Inital for the comparison.

  • Can't select more than ONE conditional text tag in FrameMaker 10?

    Hi, I work with lots and lots of Conditional Text (CT) tags in FrameMaker. We moved to v10, and now I can't select more than ONE CT tag at a time---this means when I need to apply 10 CT tags to one item, I have to select the item, click one tag, click In, and then click Apply---3 clicks, 10 separate times = 30 clicks! (I used to be able to select the item, select all the CT tags I wanted applied into the In box, and then click Apply.) This is very frustrating. I've tried to click all the Ctrl, Shift, and Alt keys separately and then try and select more than one tag, but nothing works. Please help---this is going to be a nightmare for me if this can't work!
    Please help and show me that I can add more than one tag to an item at a time. Thanks so much!!!

    Unfortunately, this capabiliy wasn't carried over to the Conditional Text pod when the new interface design was created. You're stuck selecting the tags one at a time and then applying a condition. It's a bit faster if you select the conditions sequentially, then you have fewer clicks for applying subsequent tags to the same content.
    I fully agree that this sucks.
    Please fill in a bug report and a wish list item at: FrameMaker Bugs & Wish List
    You can also add/vent to the following thread (that is monitored by Adobe):
    Seeking inputs on desired features in FrameMaker

Maybe you are looking for