Ply icon indicating copy to clipboard operation
Ply copied to clipboard

Can't make spam subscribe popin work

Open Klaitos opened this issue 10 years ago • 1 comments

Hello,

I'm following your example, the spam subscribe popup. But i can't display anything inside form content.. I only have the title and action buttons.. What is wrong ?

 Ply.factory('updateEntry', function (options, data, resolve) {


    resolve({
        "header": "Modifier une valeur",
        "content": {
            "formd": {
                "name": {label: "Username", value: data.name},
                "email": {label: "E-mail", value: data.email},
                "agree": true

            },


        },
        ctrls: {
            "ok": true,
            "cancel": "abort" // for example
        }
    });

    var element = template(data);
    resolve(element);

});


Ply.ui.factory("formd", function (data, children) {

    return {
        tag: ".formd",
        children: children
    };
});


// Default element in `fieldset`
Ply.ui.factory("formd *", function (data) {
    console.log(data);
    var uid = Math.round(Math.random() * 1e9).toString(36);
    return {
        tag: ".field",
        children: [
            {tag: "label", forHtml: uid, text: data.label},
            {tag: "input", id: uid, name: data.name, value: data.value}
        ]
    };
});

Ply.ui.factory("formd agree", function (data) {
    console.log(data);
    var uid = Math.round(Math.random() * 1e9).toString(36);
    return {
        tag: ".field",
        children: [
            {tag: "input", type: "checkbox", id: uid, name: "agree", value: "Y"},
            {tag: "label", forHtml: uid, text: "I agree."}
        ]
    };
});

Klaitos avatar Jul 28 '15 22:07 Klaitos

Even i am facing same problem. Please help me.

BJKPriyanka avatar Jul 15 '16 11:07 BJKPriyanka