We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10555
    • 32 Posts
    I have currently created a email contact program 6 months ago and I want to slowly bring everything over into modx. I currently have a form for signup and I am getting a little confused how to port it into modx.

    <?php
    require_once 'common.php';
    require_once 'list_subscribe.php';
    ?>
    
    <form name="form_list_subscribe" id="form_list_subscribe" method="post" action="list_subscribe.php">
    <div class="lbl"><label for="email">Email address</label></div><div class="obj"><input type="text" name="email" id="email" maxlength="100" value="<?php if (isset($_POST['email'])) { print(prepare_html($_POST['email'])); } ?>" title="Enter your new email address" <?php if (array_key_exists('email',$err)) { print("class=\"err\""); } ?>/><?php if (array_key_exists('email',$err)) { printf("<p class=\"err\"><em>%s</em></p>",$err["email"]); } ?></div>
    <input type="submit" name="sendme" id="sendme" value="Subscribe" title="Subscribe to the mailing list" />
    </form>


    you have to understand my solution involves a separate database so I want to use all existing code for now so I can make a deadline.

    Cheers