From 3261bff6d89c96ac2cb6a32223f63d07df74a6b4 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Fri, 29 Jan 2016 16:15:49 -0800 Subject: [PATCH 1/5] Added support for phone, address and questions @todo feedback on the register button @todo error on missing required params (projectId, clientId, etc) @todo make configuation more obvious --- .gitignore | 2 + lead.json | 54 ++++++++++++++ signup.html | 49 +++++++++++-- signup.php | 63 ++++++++++------ src/LassoLead.php | 178 +++++++++++++++++++++++++++++++++++++--------- 5 files changed, 287 insertions(+), 59 deletions(-) create mode 100644 .gitignore create mode 100644 lead.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7fea2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +registrant-submitter-php.iml \ No newline at end of file diff --git a/lead.json b/lead.json new file mode 100644 index 0000000..39c6d8b --- /dev/null +++ b/lead.json @@ -0,0 +1,54 @@ +{ + "firstName":"Test", + "lastName":"Registrant", + "clientId":"", + "projectIds":[""], + "emails":[ + { + "email":"test_reg@mylasso.com", + "type":"Home", + "primary":true + } + ], + "phones":[ + { + "phone":"123 456 7890", + "type":"Mobile", + "primary":true + } + ], + "rating":"N", + "sourceType":"Online Registration", + "addresses":[ + { + "address":"350 Fifth Avenue", + "city":"New York", + "country":"USA", + "province":"NY", + "postalCode":"NY", + "type":"Home", + "primary":true + } + ], + "questions":[ + { + "id":1, + "path":"", + "name":"t-bar", + "answers":[ + + ] + }, + { + "id":0, + "path":"projectname/survey/", + "name":"do you like us?", + "answers":[ + { + "id":"x", + "text":"Yes" + } + ] + } + ] +} diff --git a/signup.html b/signup.html index a51cf7e..8b8dbe8 100644 --- a/signup.html +++ b/signup.html @@ -1,4 +1,19 @@ + + +