1+ < html >
2+ < body >
3+ < style type ="text/css ">
4+ .template {display : none}
5+ </ style >
6+
7+ < div class ="firstname card margin:10px " data-template_id ="cualquier ">
8+ < div class ="card-body padding:15px ">
9+ < h3 class ="firstname blue "> --</ h3 >
10+ < h3 data-value ="lastname " value ="lastname "> </ h3 >
11+ < input name ="hello " value ="firstname "/>
12+ < textarea type ="textarea " name ="nuevo " value ="lastname "> </ textarea >
13+ < h3 data-attribute ="personal_info.email " value ="personal_info.email "> </ h3 >
14+
15+ < div class ="template " data-render_array ="testing_array ">
16+ < h3 data-attribute ="email " class ="phone " value ="phone "> </ h3 >
17+ </ div >
18+
19+ < a href ="# " class ="btn btn-primary "> More details</ a >
20+ </ div >
21+ </ div >
22+
23+ <!-- <div -->
24+ <!-- class="card"-->
25+ <!-- data-template_id="temp1"-->
26+ <!-- data-fetch_collection="render_test"-->
27+ <!-- data-fetch_value="5f5aeace3a7246b7cf2e4004"-->
28+ <!-- data-fetch_name="_id"-->
29+ <!-->-->
30+
31+ < div class ="template " data-template_id ="temp1 " data-render_array ="stringArray ">
32+ < h4 value ="-- " name ="email " data-value ="email "> </ h4 >
33+ </ div >
34+ < div data-tempalte_id ="temp1 ">
35+ < div class ="template " data-template_id ="temp1 " data-render_array ="stringArray ">
36+ < h4 value ="-- " name ="email " data-value ="email "> </ h4 >
37+ </ div >
38+ </ div >
39+
40+ < div class ="template " data-template_id ="temp1 ">
41+ < div class ="template " data-render_array ="stringArray " data-value ="email ">
42+ < h4 value ="-- " name ="email " data-value ="email "> </ h4 >
43+ </ div >
44+ </ div >
45+ <!--</div>-->
46+
47+
48+ <!--<div class="template" data-render_array="testing_array">-->
49+ <!-- <h3 data-attribute="email" class="phone" value="phone"></h3>-->
50+ <!--</div>-->
51+
52+ < div class ="card template margin:10px " data-template_id ="testing_array ">
53+ < div class ="card-body padding:15px ">
54+ < h3 class ="firstname blue " value ="firstname "> --</ h3 >
55+ < h3 value ="lastname "> </ h3 >
56+ < div >
57+ < input name ="hello " value ="firstname "/>
58+ </ div >
59+ < div >
60+ < textarea type ="textarea " name ="nuevo " value ="lastname "> </ textarea >
61+ </ div >
62+ < h3 data-attribute ="personal_info.email " value ="personal_info.email "> </ h3 >
63+ < a href ="# " class ="btn btn-primary "> More details</ a >
64+ </ div >
65+ </ div >
66+
67+
68+ < pre >
69+ < h1 > Paste in your browser console</ h1 >
70+
71+ CoCreateRender.render('[data-template_id=cualquier]',{
72+ firstname : 'Jean',
73+ lastname : 'Mendoza',
74+ personal_info : {email:'jeanmendozar@gmail.com','phone':'56666'},
75+ })
76+
77+ CoCreateRender.render('[data-template_id=cualquier]',{
78+ firstname : 'Jean',
79+ lastname : 'Mendoza',
80+ personal_info : {email:'jeanmendozar@gmail.com','phone':'56666'},
81+ testing_array : [
82+ {email:'jeanmendozar@gmail.com','phone':'0','home':'home1'},
83+ {email:'frank@gmail.com','phone':'1','home':'home2'},
84+ {email:'jose@gmail.com','phone':'2','home':'home3'},
85+ {email:'juan@gmail.com','phone':'3','home':'home4'},
86+ {email:'kooo@gmail.com','phone':'4','home':'home5'},
87+ {email:'allask@gmail.com','phone':'5','home':'home6'},
88+ {email:'ana@gmail.com','phone':'6','home':'home7'},
89+ {email:'rosa@gmail.com','phone':'7','home':'home8'},
90+ {email:'nuevo@gmail.com','phone':'8','home':'home9'}
91+ ],
92+ })
93+
94+ /** array section **/
95+
96+ CoCreateRender.render('[data-template_id=testing_array]', [{
97+ firstname : 'Jean',
98+ lastname : 'Mendoza',
99+ personal_info : {email:'jeanmendozar@gmail.com','phone':'0','home':'home1'},
100+ },{
101+ firstname : 'Frankie',
102+ lastname : 'Pagan',
103+ personal_info : {email:'frank@gmail.com','phone':'1','home':'home2'},
104+ }])
105+
106+
107+ CoCreateRender.render('[data-template_id=temp1]', [
108+ {
109+
110+ "stringArray": [
111+ "frank@gmail.com",
112+ "testing@gmail.com",
113+ "jin@gmail.com",
114+ "template@gmail.com"
115+ ]
116+ }
117+ ])
118+ CoCreateRender.render('[data-template_id=temp1]', [
119+ {
120+ "_id": "5f5aeace3a7246b7cf2e4004",
121+ "organization_id": "5de0387b12e200ea63204d6c",
122+ "email": "nuevo@gmail.com",
123+ "phone": "8",
124+ "type": "render",
125+ "home": "home9",
126+ "stringArray": [
127+ "frank@gmail.com",
128+ "testing@gmail.com",
129+ "jin@gmail.com",
130+ "template@gmail.com"
131+ ]
132+ }
133+ ])
134+
135+
136+ </ pre >
137+ < script >
138+ var config = {
139+ apiKey : 'c2b08663-06e3-440c-ef6f-13978b42883a' ,
140+ securityKey : 'f26baf68-e3a9-45fc-effe-502e47116265' ,
141+ organization_Id : '5de0387b12e200ea63204d6c'
142+ }
143+ </ script >
144+ </ body >
145+ <!--<script src="../src/CoCreate-response.js"></script>-->
146+ < script src ="https://server.cocreate.app/js/CoCreate.min.js "> </ script >
147+ </ html >
0 commit comments