Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: set box text input width for other

Re:Any reason this would not work? 3 years 10 months ago #50676

  • brydon
  • brydon's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Okay, thanks for taking an interest in my problems!

I have set up two sample surveys to illustrate a few issues. The version for both is limesurvey190plus-build9160-20100929:

The first survey is at areaf.rdos.bc.ca/foo/index.php?sid=95218&lang=en. It is built on the "Basic" template that shipped with the above-noted LimeSurvey package. There are three issues:

First, the label for the comment is wonky. I fix this in qanda.php by adding a break near line 2378 (denoted with ):
<p class="comment">
    <label for="answer'.$ia[1].'comment">'.$hint_comment.':[b]<BR>[/b]</label>
 
    <textarea class="textarea" name="'.$ia[1].'comment" id="answer'.$ia[1].'comment" rows="'.floor($tarows).'" cols="50" >';
        // --> END NEW FEATURE - SAVE
        if (isset($_SESSION[$fname2]) && $_SESSION[$fname2])
        {
            $answer .= str_replace("\\", "", $_SESSION[$fname2]);
        }
        $answer .= '</textarea>
</p>

Second, my original problem is an "other" box that is unresponsive to changes in template.css. In this example, the text box resizes appropriately to 500px. So I am thinking the problem must be with my other template.

Third, a minor quibble with the ranking tool. The "receiving" text boxes on the right do not resize properly. It is not much of an issue in this example but is a real problem when the items are much longer (most of the text is truncated).

I fix this by changing qanda.php by adding the "bolded" line below (it is missing in the original qanda.php). I am not sure why it is missing--without it no sizing occurs.
 if (isset($maxselectlength) && $maxselectlength > 60)
    {
        $ranklist = str_replace("<input class=\"text\"", "<input size='60' class='text'", $ranklist);
        $answer .= "</tr>\n<tr>\n"
        . "\t<td align='left' class='output'>\n"
        . "\t<table border='0' cellspacing='1' cellpadding='0'>\n"
        . "\t<tr><td></td><td><strong>".$clang->gT("Your Ranking").":</strong></td></tr>\n";
    }
    else
    {
    [b]$ranklist = str_replace("<input class=\"text\"", "<input size='" . $maxselectlength . "' class='text'", $ranklist);[/b]
        $answer .= "\t<td style=\"text-align:left; white-space:nowrap;\" class=\"rank output\">\n"
        . "\t<table border='0' cellspacing='1' cellpadding='0'>\n"
        . "\t<tr><td></td><td><strong>".$clang->gT("Your Ranking").":</strong></td></tr>\n";
    }

The second survey is at: areaf.rdos.bc.ca/foo/index.php?sid=27546&lang=en

It is identical except that it uses a template I have had kicking around for a year or two. The template is based on "Basic". The second survey has all the problems of the first except that the "other" box for the list is unresponsive to changes in template.css.

Any help would be greatly appreciated.
/M
Last Edit: 3 years 10 months ago by brydon.
The administrator has disabled public write access.

Re:Any reason this would not work? 3 years 10 months ago #50680

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
I recommedn to re-build your customized templatze from scratch, based on the current basic template. There seem to be quite a few changes which lead to missing identifiers so that the additional code in template.css is no working correctly.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re:Any reason this would not work? 3 years 10 months ago #50709

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 768
  • Karma: 349
1) This is not a bug but a matter of preference. You should be able to reposition the <p> that contains the textarea with CSS by removing the float style.

2) This may be a bug. Please open a ticket at the bugtracker and include a sample survey and your fix.

3) Mazi is correct - your template generates some 20 odd HTML errors that need to be cured. I also recommend starting anew with the current Basic template.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re:Any reason this would not work? 3 years 10 months ago #50745

  • brydon
  • brydon's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Yes, thanks, I have migrated to a new template based on the most recent version of "Basic". This solves the original problem with the "other" field (listed as #3 in previous posts).

I have also submitted the Ranking-resize issue (#2) to the bug tracker.

I still am not completely sure about the fix for my first problem (the floating label; #1). I am afraid I am a survey designer/researcher, not a developer, and don't really understand the details of CSS. Do you mean I should take the float out of:
.list-with-comment p.comment {
  margin: 0%;
  padding: 0.5em;
  text-align: left;
  float: left;
  width: 47%;
}

in template.css?

Thanks for any pointers in the right direction...
The administrator has disabled public write access.

Re:Any reason this would not work? 3 years 10 months ago #50764

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4141
  • Thank you received: 768
  • Karma: 349
Yup, remove the "float: left;" and "width: 47%;". You'll also need to do the same to .list-with-comment div.list.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.312 seconds
Donation Image