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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Updating MemberTableField on save


Go to End


11 Posts   6579 Views

Avatar
Nathan Cox

Community Member, 99 Posts

24 July 2007 at 11:42am

I'm having problems and errors pretty much everywhere trying to get this form to work completely...and I'm really getting sick of looking at it. What'll it cost for me to pay someone SilverStripe-savvy to do it?

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

24 July 2007 at 1:11pm

> What javascript do I need to say "apply this JS object to this bit"? The code that I THINK does it normally (in MemberTableField.js) is
> MemberTableField.applyTo('#Form_EditForm div.MemberTableField');
> but if I use that, it just tells me MemberTableField is undefined...

Hi Nathan,

This may be a stab in the dark, but I think that error may be caused by the fact that this does not show up in /admin/ by default:
<script type="text/javascript" src="cms/javascript/MemberTableField.js"></script>

Try making the folllowing change to cms/code/LeftAndMain.php (copied from cms/code/NewsletterAdmin.php) by putting the Requirements::javascript calls in LeftAndMain::init() :

Index: cms/code/LeftAndMain.php
===================================================================
--- cms/code/LeftAndMain.php    (revision 39154)
+++ cms/code/LeftAndMain.php    (working copy)
@@ -68,6 +68,15 @@
                Requirements::javascript('sapphire/javascript/Validator.js');

                Requirements::css("sapphire/css/SubmittedFormReportField.css");
+               // needed for MemberTableField (Requirements not determined before Ajax-Call)
+               Requirements::javascript("jsparty/greybox/AmiJS.js");
+               Requirements::javascript("jsparty/greybox/greybox.js");
+               Requirements::javascript("sapphire/javascript/TableListField.js");
+               Requirements::javascript("sapphire/javascript/TableField.js");
+               Requirements::javascript("sapphire/javascript/ComplexTableField.js");
+               Requirements::javascript("cms/javascript/MemberTableField.js");
+               Requirements::css("jsparty/greybox/greybox.css");
+               Requirements::css("sapphire/css/ComplexTableField.css");
        }

        /**

Hope this helps,

Elijah

Avatar
Nathan Cox

Community Member, 99 Posts

24 July 2007 at 1:17pm

Already done that...it solves one problem, but just leads to more...at the moment I'm having problems related to actually creating the group, or more specifically making sure the member list has the group information at all the right times.

Go to Top