Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Changing a form's action depending on the form input.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
juancferrer
Smarty n00b


Joined: 23 Sep 2007
Posts: 2

PostPosted: Sun Sep 23, 2007 5:54 pm    Post subject: Changing a form's action depending on the form input. Reply with quote

I have a table with a form that has mailto for an action (I know...but only one person is going to use this). Each row has a name, email, and a checkbox input with the email as a value. I would like to submit the form, and have the mailto action be something like action="mailto:me@abc.com?bcc=NamesSelected"

Right now I have the following, but I can't figure out how to add the selected values into the mailto string:
Code:

<form name="emails" method="post" action="mailto:me@abc.com?bcc={$smarty.post.email}>
<table>
  <div class="stats_row">
    {section name=person loop=$personlist}
    <div class="column">{$personlist[person].name</div>
    <div class="column">{$personlist[person].email</div>
    <div class="column"><input type="checkbox" name="email" value="{$personlist[person].email}" </div>
  </div>
  {/section}
</table>
<input type="submit" value="Contact People">
</form>

Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP