We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Reducing width of input fields

Hi, I have recently started playing with openclinica 3.1.3 and would like to reduce the width of input fields in tabular groups. I have tried the instructions here-
http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery

But nothing happened. I have checked the script (see a screenshot below) compared to the instructions and can’t see any issues.

I can reduce the size of all the inputs in a section using the instructions from trialdatasolutions.com, but I only want to do it for individual groups. If someone could tell me if I am making glaring errors, I would much appreciate it.

Thanks

Ken

Comments

  • r.meesterr.meester Posts: 14
    Dear Ken,
    Since OC defines the width of with the cols attribute, my first hunch was that cols wins over the style attribute when they are both present. I experimented a little with Firebug in Firefox. In Firefox the style attribute wins, regardless whether it is defined before or after the cols attribute. I read somewhere that in most browsers this is the expected behavior. It might be that your browser does it differently.
    That said, is there a reason to define your elements as textarea? It seems like overkill to me for the data that you want to capture. You might want to try setting the response_type to 'text' in your OC excel sheet, and use 'input' in the script.
    Hope this helps.
    Robert
    On Dec 18, 2012, at 9:38 AM, Kenneth Micklethwaite wrote:
    > Hi, I have recently started playing with openclinica 3.1.3 and would like to reduce the width of input fields in tabular groups. I have tried the instructions here-
    > http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery
    >
    > But nothing happened. I have checked the script (see a screenshot below) compared to the instructions and can’t see any issues.
    >
    > I can reduce the size of all the inputs in a section using the instructions from trialdatasolutions.com, but I only want to do it for individual groups. If someone could tell me if I am making glaring errors, I would much appreciate it.
    >
    > Thanks
    >
    > Ken
    >
    >
    >
  • Thanks Robert, I have tried the changes recommended with no success. I have however found a work around. I have changed the width of the whole section as described in clinicaltrialsolutions.com and then changed the non-grouped input boxes to their previous widths using the instructions here http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery
    Interestingly, this worked when there was only one tabular group in the sections but so far has not worked when I have had more than one tabular group in the section.
    I have used both firefox 17.0.1 and internet explorer 8- both give the same result, so I think I must be doing something wrong. I will have to continue to experiment with it.
    By the way is there a list of jquery commands and their interpretations somewhere?

    Ken
    Sent: Tuesday, 18 December 2012 10:26 PM
    To:
    Subject: Re: [Users] Reducing width of input fields

    Dear Ken,

    Since OC defines the width of with the cols attribute, my first hunch was that cols wins over the style attribute when they are both present. I experimented a little with Firebug in Firefox. In Firefox the style attribute wins, regardless whether it is defined before or after the cols attribute. I read somewhere that in most browsers this is the expected behavior. It might be that your browser does it differently.
    That said, is there a reason to define your elements as textarea? It seems like overkill to me for the data that you want to capture. You might want to try setting the response_type to 'text' in your OC excel sheet, and use 'input' in the script.

    Hope this helps.
    Robert

    On Dec 18, 2012, at 9:38 AM, Kenneth Micklethwaite wrote:
    Hi, I have recently started playing with openclinica 3.1.3 and would like to reduce the width of input fields in tabular groups. I have tried the instructions here-
    http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery

    But nothing happened. I have checked the script (see a screenshot below) compared to the instructions and can’t see any issues.

    I can reduce the size of all the inputs in a section using the instructions from trialdatasolutions.com, but I only want to do it for individual groups. If someone could tell me if I am making glaring errors, I would much appreciate it.

    Thanks

    Ken

  • adridderadridder Posts: 38
    Hi Ken,
    I gave it a shot and the code does still work in 3.1.3; item 4 and item 10 in the screenshot are textarea and I changed their widths. If you're interested I can send you the CRF and you can check whether it works when you upload mine?
    As for jQuery, the API with the commands is located at http://api.jquery.com/
    Cheers,
    Sander

    On 20 December 2012 12:27, Kenneth Micklethwaite wrote:
    Thanks Robert, I have tried the changes recommended with no success. I have however found a work around. I have changed the width of the whole section as described in clinicaltrialsolutions.com and then changed the non-grouped input boxes to their previous widths using the instructions here http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery
    Interestingly, this worked when there was only one tabular group in the sections but so far has not worked when I have had more than one tabular group in the section.
    I have used both firefox 17.0.1 and internet explorer 8- both give the same result, so I think I must be doing something wrong. I will have to continue to experiment with it.
    By the way is there a list of jquery commands and their interpretations somewhere?

    Ken
    Sent: Tuesday, 18 December 2012 10:26 PM
    To:
    Subject: Re: [Users] Reducing width of input fields

    Dear Ken,

    Since OC defines the width of with the cols attribute, my first hunch was that cols wins over the style attribute when they are both present. I experimented a little with Firebug in Firefox. In Firefox the style attribute wins, regardless whether it is defined before or after the cols attribute. I read somewhere that in most browsers this is the expected behavior. It might be that your browser does it differently.
    That said, is there a reason to define your elements as textarea? It seems like overkill to me for the data that you want to capture. You might want to try setting the response_type to 'text' in your OC excel sheet, and use 'input' in the script.

    Hope this helps.
    Robert

    On Dec 18, 2012, at 9:38 AM, Kenneth Micklethwaite wrote:
    Hi, I have recently started playing with openclinica 3.1.3 and would like to reduce the width of input fields in tabular groups. I have tried the instructions here-
    http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery

    But nothing happened. I have checked the script (see a screenshot below) compared to the instructions and can’t see any issues.

    I can reduce the size of all the inputs in a section using the instructions from trialdatasolutions.com, but I only want to do it for individual groups. If someone could tell me if I am making glaring errors, I would much appreciate it.

    Thanks

    Ken

  • adridderadridder Posts: 38
    Hmm, the image appears to be missing... Let's try again:
    Inline images 1
    Cheers,
    Sander
    On 20 December 2012 17:01, Sander de Ridder wrote:
    Hi Ken,
    I gave it a shot and the code does still work in 3.1.3; item 4 and item 10 in the screenshot are textarea and I changed their widths. If you're interested I can send you the CRF and you can check whether it works when you upload mine?
    As for jQuery, the API with the commands is located at http://api.jquery.com/
    Cheers,
    Sander

    On 20 December 2012 12:27, Kenneth Micklethwaite wrote:
    Thanks Robert, I have tried the changes recommended with no success. I have however found a work around. I have changed the width of the whole section as described in clinicaltrialsolutions.com and then changed the non-grouped input boxes to their previous widths using the instructions here http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery
    Interestingly, this worked when there was only one tabular group in the sections but so far has not worked when I have had more than one tabular group in the section.
    I have used both firefox 17.0.1 and internet explorer 8- both give the same result, so I think I must be doing something wrong. I will have to continue to experiment with it.
    By the way is there a list of jquery commands and their interpretations somewhere?

    Ken
    Sent: Tuesday, 18 December 2012 10:26 PM
    To:
    Subject: Re: [Users] Reducing width of input fields

    Dear Ken,

    Since OC defines the width of with the cols attribute, my first hunch was that cols wins over the style attribute when they are both present. I experimented a little with Firebug in Firefox. In Firefox the style attribute wins, regardless whether it is defined before or after the cols attribute. I read somewhere that in most browsers this is the expected behavior. It might be that your browser does it differently.
    That said, is there a reason to define your elements as textarea? It seems like overkill to me for the data that you want to capture. You might want to try setting the response_type to 'text' in your OC excel sheet, and use 'input' in the script.

    Hope this helps.
    Robert

    On Dec 18, 2012, at 9:38 AM, Kenneth Micklethwaite wrote:
    Hi, I have recently started playing with openclinica 3.1.3 and would like to reduce the width of input fields in tabular groups. I have tried the instructions here-
    http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery

    But nothing happened. I have checked the script (see a screenshot below) compared to the instructions and can’t see any issues.

    I can reduce the size of all the inputs in a section using the instructions from trialdatasolutions.com, but I only want to do it for individual groups. If someone could tell me if I am making glaring errors, I would much appreciate it.

    Thanks

    Ken

  • Thanks Sander, that would be great if you could send me the CRF so I could check if it works in mine.

    Ken
    Sent: Friday, 21 December 2012 3:08 AM
    To: [email protected]
    Subject: Re: [Users] Reducing width of input fields

    Hmm, the image appears to be missing... Let's try again:
    Inline images 1
    Cheers,
    Sander

    On 20 December 2012 17:01, Sander de Ridder wrote:
    Hi Ken,
    I gave it a shot and the code does still work in 3.1.3; item 4 and item 10 in the screenshot are textarea and I changed their widths. If you're interested I can send you the CRF and you can check whether it works when you upload mine?
    As for jQuery, the API with the commands is located at http://api.jquery.com/
    Cheers,
    Sander
    Error! Filename not specified.

    On 20 December 2012 12:27, Kenneth Micklethwaite wrote:
    Thanks Robert, I have tried the changes recommended with no success. I have however found a work around. I have changed the width of the whole section as described in clinicaltrialsolutions.com and then changed the non-grouped input boxes to their previous widths using the instructions here http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery
    Interestingly, this worked when there was only one tabular group in the sections but so far has not worked when I have had more than one tabular group in the section.
    I have used both firefox 17.0.1 and internet explorer 8- both give the same result, so I think I must be doing something wrong. I will have to continue to experiment with it.
    By the way is there a list of jquery commands and their interpretations somewhere?

    Ken
    Sent: Tuesday, 18 December 2012 10:26 PM
    To:
    Subject: Re: [Users] Reducing width of input fields

    Dear Ken,

    Since OC defines the width of with the cols attribute, my first hunch was that cols wins over the style attribute when they are both present. I experimented a little with Firebug in Firefox. In Firefox the style attribute wins, regardless whether it is defined before or after the cols attribute. I read somewhere that in most browsers this is the expected behavior. It might be that your browser does it differently.
    That said, is there a reason to define your elements as textarea? It seems like overkill to me for the data that you want to capture. You might want to try setting the response_type to 'text' in your OC excel sheet, and use 'input' in the script.

    Hope this helps.
    Robert

    On Dec 18, 2012, at 9:38 AM, Kenneth Micklethwaite wrote:

    Hi, I have recently started playing with openclinica 3.1.3 and would like to reduce the width of input fields in tabular groups. I have tried the instructions here-
    http://en.wikibooks.org/wiki/OpenClinica_User_Manual/StylingWithJQuery

    But nothing happened. I have checked the script (see a screenshot below) compared to the instructions and can’t see any issues.

    I can reduce the size of all the inputs in a section using the instructions from trialdatasolutions.com, but I only want to do it for individual groups. If someone could tell me if I am making glaring errors, I would much appreciate it.

    Thanks

    Ken

This discussion has been closed.