Hi,
I am new to ModX, but really like what I see so far and plan to use it for many projects. I am primarily an xhtml/css/Javascript/design person and not a backend programmer, so a system like this is very helpful.
I am having a real problem, though and hope I can get some assistance from someone as to what I am doing incorrectly.
http://accelerationweekly.com/index.php?id=3
This is the page I am having the issue with. No matter what I do, the action="[~[*id*]~]" is not working. When I look at the source, this is what is happening:
<form method="post" id="contactForm1" action="index.php?id=3">
It’s pulling the page id, not the form id. I created an uncached page using a template, and then for in content of the page, here is how I am calling the snippet:
<h1>Contact</h1>
<div id="contactArea">
[!eForm?&formid=`contactForm1`&to=`[email protected]`&tpl=`contactForm`&report=`commentResults`&thankyou=`eFeedbackThanks`&subject=`Web site feedback`&gotoid=`19`!]
{{contactInfo}}
</div>
I have three chunks I made for this, first, the form itself:
<div id="contactForm">
<form method="post" id="contactForm1" action="[~[*id*]~]">
<label>First Name*</label>
<br />
<input type="text" name="fname" id="fname" eform="First Name::1:" />
<br />
<label>Last Name*</label>
<br />
<input type="text" name="lname" id="lname" eform="Last Name::1:" />
<br />
<label>Acceleration Weekly Screen Name</label>
<br />
<input type="text" name="sname" id="sname" eform="Screenname::1"/>
<br />
<label>E-Mail Address*</label>
<br />
<input type="text" name="email" id="email" eform="Email Address:email:1"/>
<br />
<label>City*</label>
<br />
<input type="text" name="city" id="city" eform="City::1"/>
<br />
<div id="stateBox">
<label class="stateLbl">State*</label>
<br />
<input type="text" name="state" id="state" eform="State::1"/>
<br />
</div>
<div id="countryBox">
<label class="countryLbl">Country*</label>
<br />
<input type="text" name="country" id="country" eform="Country::1"/>
<br />
</div>
<div class="clear"></div>
<label>Daytime Phone</label>
<br />
<input type="text" name="phone" id="phone" eform="Phone::1"/>
<br />
<label>Topic</label>
<br />
<select name="topic" id="topic">
<option>General Info</option>
<option>Tech Support</option>
<option>Sponsorship Inquiry</option>
<option>Media Inquiry</option>
</select>
<br />
<label>Comments**</label>
<br />
<textarea name="comments" id="comments" cols="5" rows="10" eform="Comments:textarea:1"></textarea>
<br />
<p id="formLimit">*Required fields</p>
<p id="textLimit">**Maximum 2000 words</p>
<input name="Submit" type="submit" id="submitBttnContact" value="Submit" />
</form>
</div>
Then, the results:
<p>This is a response sent by <b>[+name+]</b> using the feedback form on this website. The details of the message follow below:</p>
<p>Name: [+name+]</p>
<p>Email: [+email+]</p>
<p>Regarding: [+subject+]</p>
<p>Comments:<br />[+message+]</p>
<p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE: [+subject+]">[+email+]</a></p>
Finally, this is set up to go to a thank you page:
http://accelerationweekly.com/index.php?id=19
The snippet IS inserting the form into the page-the form action just resets to the page id.....what am I doing wrong here?
Thanks for any help you can offer.