Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

CSS class not populating in textarea wrapper div


Reply

4 Posts   468 Views

Avatar
sam523

23 May 2013 at 9:35am Community Member, 3 Posts

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

Avatar
Willr

23 May 2013 at 8:03pm Forum Moderator, 5511 Posts

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

Avatar
sam523

24 May 2013 at 12:13am Community Member, 3 Posts

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?

Avatar
Willr

24 May 2013 at 5:57pm Forum Moderator, 5511 Posts

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);