Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » CSS class not populating in textarea wrapper div

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 460 Views
  • sam523
    Avatar
    Community Member
    3 Posts

    CSS class not populating in textarea wrapper div Link to this post

    I've been on a new job so I'm not tremendously familiar with SilverStripe ... using it here is my first experience with it. That being said, I'm having a problem that I hope is super-simple that somebody can help me with, because I'm not having any luck solving it.

    We have a form that has ~8-10 input fields and two of them aren't populating the CSS class in the div that wraps the div that contains the text area. For instance, we have this html rendering on our servers:

    <div >
    <div id="MemberBio" class="field textarea "><label class="left" for="Form_EditProfileForm_MemberBio">Talk about your previous work experience, your life, or both</label><div class="middleColumn"><textarea id="Form_EditProfileForm_MemberBio" name="MemberBio" rows="5" cols="20"></textarea></div></div>
    </div>

    but when we run the identical code base locally, we're getting

    <div class="MemberBio">
                <div id="MemberBio" class="field textarea "><label class="left" for="Form_EditProfileForm_MemberBio">Talk about your previous work experience, your life, or both</label><div class="middleColumn"><textarea id="Form_EditProfileForm_MemberBio" name="MemberBio" rows="5" cols="20"></textarea></div></div>
             </div>
             

    That MemberBio class in the div makes all the difference (without it the layout is pretty messed up) in this and I'm not having a ton of luck figuring out where this is generated. If anybody has any ideas, or can at least ask me questions that will steer me in the right direction, I would really appreciate it!

    Thanks,
    Sam

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: CSS class not populating in textarea wrapper div Link to this post

    Not sure what the differences could be between your local and prod sites. I would investigate those differences (could be a different SS versions)

  • sam523
    Avatar
    Community Member
    3 Posts

    Re: CSS class not populating in textarea wrapper div Link to this post

    That's the thing ... the code bases are identical, running 2.4.something. I guess what I'm wondering is where is the code that's the basis for the html that's rendered for the textarea and the wrapper div?

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: CSS class not populating in textarea wrapper div Link to this post

    See http://doc.silverstripe.org/framework/en/topics/forms#custom-form-templates for information on custom form templates (if your form make use them). You can turn on template debugging to see where that div is coming from

    // mysite/_config.php
    SSViewer::set_source_file_comments(true);

    460 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.