We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4966
    • 143 Posts
    Having one of the days. How do I style eforms? Link to a new style sheet. Where do I define this? I’ve read the documentation but could not find anything and I was looking at the sample form included with a new install and see that the &cssStyle=`ContactStyles` is defined in the contact page but I’ve not found ContactStyles. Is it possible to just link to a new stylesheet for my eForm?

    thanks,

      • 5340
      • 1,624 Posts
      put your form in a div with an id(or just use an id for the form) and style within your main css file (Eg. #myform input{my styles})
        • 30223
        • 1,010 Posts
        Quote from: charlie-imac at Jun 24, 2008, 09:24 AM

        Having one of the days. How do I style eforms? Link to a new style sheet. Where do I define this? I’ve read the documentation but could not find anything and I was looking at the sample form included with a new install and see that the &cssStyle=`ContactStyles` is defined in the contact page but I’ve not found ContactStyles. Is it possible to just link to a new stylesheet for my eForm?

        thanks,
        Read the documentation again:

        &cssStyle (optional)
        Adds a style declaration to the <head> section of the page when either the form is displayed or the thank you page is displayed (only if the &thankyou parameter is set). Values can be a document id (numeric), chunk name or (relative or absolute) url to css file. Multiple values can be separated by a comma (in fact all three values can be mixed).
        examples:
        [!eForm &cssStyle=`assets/site/forms.css,chunkName` ... !]
        [!eForm &cssStyle=`chunkName` ... !]
        [!eForm &cssStyle=`http://mysite.com/assets/styles/forms.css` ... !]
        Chunks (and documents if a doc id is given) can return a values in the form of:

        1. an inline style block, eg. <style type="text/css">/*some styles*/</style>
        2. a link to stylesheet(s), eg. <link href="assets/site/forms.css" rel="stylesheet" type="text/css">
        3. a comma separated list of urls, eg. assets/site/forms.css,assets/site/more.css,assets/site/gone_overboard.css

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I learned many years ago that doctors are supposed to read the prescription information on a bottle of medicine three times before administering the medication. I have since tried to make it a habit to read documentation three times before implementing anything; if I get articles or books on a subject I try to get three from three different authors. Amazing what you pick up the second and third times through that you miss on the first time.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 10868
            • 1 Posts
            in the example for sending multiple forms in the documentation (http://www.modxcms.de/assets/snippets/eform/docs/eform_example_multiple_forms.htm) is an error. in the snippet call at the bottom of the page:
            [!eForm? &formid=`jobRequest` &subject=`Status request for [+jobnumber+]` &tpl=`requestForm` &report=`requestReport` to =`[email protected]`!]
            there is a "&" missing at "to =`[email protected]`".

            won’t work without...
              • 29437
              • 2 Posts
              I know that this has been asked before, but I can’t find the answer.

              How do I get the placeholders to work in to my goto page?
              I have them there, but they only display blank space.

              Thanks!
                • 30223
                • 1,010 Posts
                You can’t, not easily anyway. When you use the gotoid you redirect the user to a new page using a new browser request. This basically means that eForm no longer runs and the form data is no longer available to you.

                Without changing too much what you can try to do is to use the &thankyou parameter and set that to the same page_id as you now use for the &gotoid parameter. This should ’import’ the content (but not any of the other page properties) into your eform as a template. However this content will be inserted where you have the eform call meaning any other content in your form page will be displayed again as well. If that’s not what you want you could move the original text into your form template.

                The other possibility is to save all your form data to the session (using the onMailSent event for example) and write a snippet which retrieves this session data and place this snippet in the gotoid page.
                  • 32556
                  • 3 Posts
                  Quote from: noahlearner at Apr 04, 2008, 07:37 PM

                  Hi all,

                  I just moved my build site from one host to another. I also upgraded from modx 9.61 to 9.61 p2.

                  When someone submits a form on this page: http://www.thechickenbox.com/index.php?id=59 they get this error message: Main mail: Mailer was unable to send mailCould not instantiate mail function.

                  The form worked on my old host and doesn’t work on the new one. On my new host i have mail forwarders set up so that emails sent to [email protected] go to [email protected].

                  Any Help to get this set up will be much appreciated.

                  Noah

                  Did you ever find an answer to your question? I don’t see that it was ever answered and am having the same issue. thanks.

                    • 18862
                    • 70 Posts
                    Is there anything special I have to do in the modx configuration to get e-mail to work? Like set the mail server or something? Some setting in apache?

                    I’ve got everything working with eForm, except no e-mail goes out. Everything appears to function fine, but then I check the e-mail account I am sending test e-mails to and nothing.

                    Yet, when I use the "forgot password" option on the login screen for the modx/manager, that works fine and I get an e-mail from it. So I know that modx knows how to send an e-mail from my server. Not sure what’s missing for eForm to be able to do it.

                    Any ideas of what to check?

                    Thank you so much!!
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      Are you sending to the same address in both cases? I had one host that blocked outgoing email using the PHP mail() function to all but internal addresses (sending to my own email on the same server that the site was on).
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org

                      This discussion is closed to further replies. Keep calm and carry on.