Đang Thực Hiện

I would like to hire a Javascript Developer

We are a small professional football club who are sending reports to some young players through a google form. We have a script and associated files previously developed, but are having problems with a line of code, and would really appreciate some understanding of where we're going wrong and some assistance in sorting it.

Here's the code:

function sendEmail(row) {

var docTemplate = "1dtjuvjAatZyLyejjU4J113p_eC38eD8yrr4vCjTxNxY";

var docName = "RegionalDevelopmentCentreEndOfSeasonReport";

var FIRST_NAME = 1;

var PLAYER_EMAIL = 3;

var COACH_FULL_NAME = 4;

var INDEX = 0;

var KEY = 1;

// This list matches a particular placeholder in the Google Doc with

// the column that placeholder's value appears in in the spreadsheet,

// where Col A = 0, Col B = 1, etc..

var formKeys = [[1,"keyPlayerFirstName"],

[2,"keyPlayerSurname"],

[4,"keyCoachFullName"],

[6,"keyDestroyer1"],

[7,"keyDestroyer2"],

[8,"keyDestroyer3"],

[9,"keyCreator1"],

[10,"keyCreator2"],

[11,"keyCreator3"],

[12,"keyGoal1"],

[13,"keyGoal2"]

[14,"keyGoal3"],

[15,"keyPsychology"],

[5,"keyDevCentre"]];

var splitFields = ["keyDestroyer1",

"keyCreator1",

"keyGoal1"];

var source = [url removed, login to view](docTemplate);

var newFile = [url removed, login to view]("Mid-Season Review");

var copyId = [url removed, login to view]();

var copyDoc = [url removed, login to view](copyId);

var copyBody = [url removed, login to view]();

for(var i=0; i<[url removed, login to view]; i++) {

isSplitField = false;

for(var j=0; j<[url removed, login to view]; j++) {

if(formKeys[i][KEY] == splitFields[j]) {

isSplitField = true;

key = formKeys[i][KEY];

values = row[formKeys[i][INDEX]].split(', ');

[url removed, login to view]([url removed, login to view]("A"), values[0]);

[url removed, login to view]([url removed, login to view]("B"), values[1]);

break;

}

}

if(!isSplitField) {

[url removed, login to view](formKeys[i][KEY], row[formKeys[i][INDEX]]);

}

}

[url removed, login to view]();

var pdf = [url removed, login to view](copyId).getAs("application/pdf");

var subject = "RDC End Of Season Report 2016/17";

var body = "Dear " + row[FIRST_NAME] + ",_LB_";

body += "_LB_Congratulations on being offered a place within the Regional Development Centre Programme for next season. You should be immensely proud of your achievement._LB_";

body += "_LB_Please find attached your report, which has been completed by your Regional Development Centre coaches._LB_";

body += "_LB_Use this report to focus your efforts during the off season, and push yourself to develop and improve your performance ahead of the 2017/18 campaign._LB_";

body += "_LB_Well done! Keep up the good work._LB_";

body += "_LB_Kind Regards,_LB_";

body += "_LB_Jonny Martin_LB_";

body += "Football Development Manager_LB_";

body += "Cambs Glass Stadium | Newmarket Road | Cambridge | CB5 8LN_LB_";

body += "T 01223 566500 | E [url removed, login to view]@[url removed, login to view] | @ @CUCoachJonny";

// Replace text with \n for plain text

var plainTextContent = [url removed, login to view]('_LB_').join('\n');

// Replace text with <br /> for HTML

var htmlContent = [url removed, login to view]('_LB_').join('<br />');

//[url removed, login to view]({to: [url removed, login to view][PLAYER_EMAIL], subject: subject, body: plainTextContent, htmlBody: htmlContent, attachments: pdf});

try {

[url removed, login to view]({

to: row[PLAYER_EMAIL],

subject: subject,

body: plainTextContent,

htmlBody: htmlContent,

attachments: pdf

});

response = "sent";

} catch(error) {

response = [url removed, login to view]();

}

[url removed, login to view](copyId).setTrashed(true);

return response

}

Kỹ năng: Javascript, jQuery / Prototype, PHP, Phát triển phần mềm

Xem thêm: esri developer javascript, developer javascript, web developer javascript project, russian developer javascript, mobile developer javascript, asp developer bid hire, iphone developer cost hire, facebook developer javascript ajax, tianjin web developer javascript, iphone developer work hire, buddypress developer website hire

Về Bên Thuê:
( 1 nhận xét ) Saffron Walden, United Kingdom

Mã Dự Án: #14681705

Đã trao cho:

celalaybar

Hello. I can help you with sendEmail function. Relevant Skills and Experience I am good at PHP, JavaScript, HTML and CSS. Proposed Milestones £50 GBP - Done.

£50 GBP trong 0 ngày
(47 Đánh Giá)
4.9

12 freelancer đang chào giá trung bình £22 cho công việc này

neerajagrawal201

Hi, We are serving in the field of Website & Software Design, HTML, CSS, Java, PHP, C#, javascript, bootstrap, [url removed, login to view], .NET, SQL, Biometrics, Android native/hybrid, since 2015. We also started providing service in Thêm

£19 GBP trong 1 ngày
(29 Đánh Giá)
4.9
TuyenPHP

Hi employer. I am a professional developer in PHP, Angularjs, [url removed, login to view], NodeJS, Wordpress, Laravel, Codeignitor, Magento, Joomla, Prestashop, OpenCart,CakePHP, Smarty, CSS3, HTML5, Jquery. I think i can do this projec Thêm

£23 GBP trong 1 ngày
(35 Đánh Giá)
4.8
VangHaleena17

Hi You can see also my France client e-commerce site url [url removed, login to view] and [url removed, login to view] site for my HONG KONG client. I will send you my simple demo. Relevant Skills and Experience Thêm

£23 GBP trong 1 ngày
(13 Đánh Giá)
4.1
£13 GBP trong 2 ngày
(12 Đánh Giá)
3.5
ByteSols

Hello, This is Milan We are the team of 20 developers based in Rancho Palos Verdes California . We have 6+ yrs combined experience with expertise in mobile and web technologies.. Relevant Skills and Experience So Thêm

£23 GBP trong 1 ngày
(6 Đánh Giá)
3.5
technoweb7

Greetings, we are a team of 35 developers and 20 designers and each having more than 8 years experience. I would very much happy to work with you on your project and I have already checked detail your requirement and Thêm

£18 GBP trong 1 ngày
(1 Đánh Giá)
2.2
£18 GBP trong 1 ngày
(1 Đánh Giá)
1.3
Zoftcast

Hello, My name is Josh, I am a software developer with over 10 years of experience in building software solution from concept to finished product. My expertise includes android and iOS Thêm

£20 GBP trong 7 ngày
(2 Đánh Giá)
1.2
£18 GBP trong 1 ngày
(0 Đánh Giá)
0.0
richardsangohil

Hello Sir/Madam, I am available to start work on this project I have 8 years of experience in Development / Designing / SEO / SMO Waiting to hear from your end With best regards, Richardsan.

£15 GBP trong 2 ngày
(1 Đánh Giá)
0.1
£23 GBP trong 2 ngày
(0 Đánh Giá)
0.0