Skip to content

Can't make spam subscribe popin work #7

@Klaitos

Description

@Klaitos

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."}
        ]
    };
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions