How do I make my textareas expand when a checkbox for each is checked?

  • Profile Image
    zegron
    Asked on April 01, 2013 at 09:20 AM

    I'm trying to create a similar form to this site's: http://www.custommade.com/copper-range-hood-and-frieze/by/ckv/?honeycomb=1

     

    As you'll notice there are several options in the right sidebar 'custom made'. If you check the checkbox for each option the textarea opens up. I've tried several ways to do this: but none give me a checkbox that will expand/de-expand the textarea as the checkbox is marked and unmarked.

    onfocus="this.rows=10;" style="resize: none;" did work, but the textarea stays open and there is no checkbox.

    I have to use jotform because on my host I can't use any server side scripting, i have to use an external server, hence jorform working beautifully for me.

    This is my form: http://form.jotformpro.com/form/30903471509957

    Any assistance anyone can give would be fantastic.

     

    thanks!

    Matt

     

  • Profile Image
    zegron
    Answered on April 01, 2013 at 09:52 AM

    I figured it out, using conditional statements, i created 2 correspondingly labled checkboxes and 4 textareas. For each checkbox I set a condition that would show the textarea if the checkbox was filled and boom each textarea would show or hide based on if the corresponding checkbox was filled or not. Just need to edit the layout so the checkboxes are next to the proper textareas. :-)

  • Profile Image
    EduardoMendez
    Answered on April 01, 2013 at 10:02 AM

    Excellent!

    Let us know if you need further assistance with this.

  • Profile Image
    zegron
    Answered on April 01, 2013 at 10:08 AM

    checked="?" for checkboxes off by default? selecting it in the form menu doesn't seem to work. checked="checked" is on by default, that much i know, but I couldn't find an answer when purusing the user guide.

  • Profile Image
    EduardoMendez
    Answered on April 01, 2013 at 10:40 AM

    Hi there, 

    I am not sure I understand your question.  Can you please expand on what you are trying to accomplish?

    I'll be glad to help!

  • Profile Image
    EduardoMendez
    Answered on April 01, 2013 at 10:41 AM

    Also, please include the URL of the form you are working on.  Just so that we can clone it and chek on our end .  Thanks :)

  • Profile Image
    zegron
    Answered on April 01, 2013 at 12:35 PM

    I figured it out, i was trying to set it up so the checkboxes were unchecked by default. removing checked="checked" from the source code did the trick. :-)

  • Profile Image
    sidharth_kch
    Answered on April 01, 2013 at 01:10 PM

    Great that you figured it out yourself. Should you have any questions feel free to contact us again.

    Thanks,

    Sidharth