bzwerg
Neues Mitglied
Hallo, ich bin schon fast kurz vorm verzweifeln. Ich habe mir bei newsletter2go ein Anmeldeformular für meine Website zusammengestellt und erhalte am Ende ein Script. Nun möchte ich gern den Absendebutton vom Style anpassen. In dem Script gibt es natürlich kein <form>-Bereich. Der Anbieter selbst schreibt folgendes:
Anpassungsmöglichkeiten / JavaScript API
Die Funktion subscribe:createForm akzeptiert zwei weitere Parameter:
Im ersten Parameter können Sie zum Anpassen des Aussehens eine Konfiguration übergeben. Folgende Konfiguration wird standardmäßig verwendet und kann von Ihnen individuell angepasst werden:
var config = {
"form": {
"class": "",
"style": ""
},
"container": {
"type": "table",
"class": "",
"style": "width: 100%;"
},
"row": {
"type": "tr",
"class": "",
"style": ""
},
"columnLeft": {
"type": "td",
"class": "",
"style": "width: 40%; padding: 10px 5px;"
},
"columnRight": {
"type": "td",
"class": "",
"style": ""
},
"checkbox": {
"type": "input",
"class": "",
"style": ""
},
"separator": {
"type": "br",
"class": "",
"style": ""
},
"input": {
"class": "",
"style": "padding: 5px 10px; border-radius: 2px; border: 1px solid #d8dee4;"
},
"dropdown": {
"type": "select",
"class": "",
"style": "padding: 3px 5px; border-radius: 2px; border: 1px solid #d8dee4;"
},
"button": {
"type": "button",
"class": "",
"id": "",
"style": "background-color: #00baff; border: none; border-radius: 4px; padding: 10px 20px; color: #ffffff; margin-top: 20px; cursor: pointer;"
},
"label": {
"type": "label",
"class": "",
"style": "padding-left: 5px"
},
"message": {
"type": "h2",
"class": "",
"id": "",
"style": "text-align: center;"
}
}
Fügen Sie diese Konfiguration einfach dem Call hinzu:
n2g('subscribe:createForm') <<-- hiermit endet das Script und ich soll config einfügen:
n2g('subscribe:createForm', config)
Mein Problem: Wo soll ich den Code ab var config einfügen? Ist das ein CSS Style Part oder ein Java Script Part? Sobald ich config einfüge, wird kein Formular mit angezeigt.
Anpassungsmöglichkeiten / JavaScript API
Die Funktion subscribe:createForm akzeptiert zwei weitere Parameter:
Im ersten Parameter können Sie zum Anpassen des Aussehens eine Konfiguration übergeben. Folgende Konfiguration wird standardmäßig verwendet und kann von Ihnen individuell angepasst werden:
var config = {
"form": {
"class": "",
"style": ""
},
"container": {
"type": "table",
"class": "",
"style": "width: 100%;"
},
"row": {
"type": "tr",
"class": "",
"style": ""
},
"columnLeft": {
"type": "td",
"class": "",
"style": "width: 40%; padding: 10px 5px;"
},
"columnRight": {
"type": "td",
"class": "",
"style": ""
},
"checkbox": {
"type": "input",
"class": "",
"style": ""
},
"separator": {
"type": "br",
"class": "",
"style": ""
},
"input": {
"class": "",
"style": "padding: 5px 10px; border-radius: 2px; border: 1px solid #d8dee4;"
},
"dropdown": {
"type": "select",
"class": "",
"style": "padding: 3px 5px; border-radius: 2px; border: 1px solid #d8dee4;"
},
"button": {
"type": "button",
"class": "",
"id": "",
"style": "background-color: #00baff; border: none; border-radius: 4px; padding: 10px 20px; color: #ffffff; margin-top: 20px; cursor: pointer;"
},
"label": {
"type": "label",
"class": "",
"style": "padding-left: 5px"
},
"message": {
"type": "h2",
"class": "",
"id": "",
"style": "text-align: center;"
}
}
Fügen Sie diese Konfiguration einfach dem Call hinzu:
n2g('subscribe:createForm') <<-- hiermit endet das Script und ich soll config einfügen:
n2g('subscribe:createForm', config)
Mein Problem: Wo soll ich den Code ab var config einfügen? Ist das ein CSS Style Part oder ein Java Script Part? Sobald ich config einfüge, wird kein Formular mit angezeigt.