We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33241
    • 9 Posts
    Dear MODx community!

    I’d like to make a module what is able to solve my boss’s request:

    The users of the manager (managers from now) would like to be able to decide which picture should represent a menu element on a webpage i’m developing. Because of using css, i can distinguish them by using different ID-s, so all i should do is to let them pick their favourite one on a form, push an accept button, and this module should set my placeholders to their appropriate values.

    Sounds easy, but because i’m a newbie, makes my life hard.

    I think i should create a html form for my pictures, radio buttons (or checkboxes, not decided yet), and send the values back for my module to process it by a php code. But i don’t now how to make the connection between the module code and the value of a placeholder. I’ve tried the $modx->setPlaceholder() API call, but it works from a snippet, what need to be called. Okay, tried to call it from a module code with $modx->runSnippet() API call, without success. Do i have to write a plugin for that events (for example. OnDocFormRender)?

    Sry for my questions, but i would be really happy if somebody would be so kind to write a very very simple module for me what is able to let me change a value of a placeholder or anything by a form. I could complete the code, just i’m having trouble starting it.

    Ty in advance!

    Ysera