Bryan VonDeylen Posted April 6, 2005 Posted April 6, 2005 I would like to have FileMaker send an email to a specific person when a new record is created (or modified). My code right now looks something like this: -input name="-edit" type="submit"- -xsl:attribute name="value">Save Record -xsl:variable name="send_mail" select="fmxslt:send_email('[email protected][email protected]&subject=Reservation Added','New Reservation Added for:')"/- -/input- What I would like, is to put the Title of the Tradebook after the line "New Reservation Added for:". So, I want to mix the static text with a field submitted and have it emailed. Possible? If so, how? tia
Martin Brändle Posted April 7, 2005 Posted April 7, 2005 Bryan, you can't embed the e-mail part in the form. Think of what would happen when the XSLT engine transforms your code - the email part would already be interpreted before the user would be able to do anything with the form. BTW I don't see a closing xsl:attribute tag. You have to split your code into two pages. page1.xsl has the form and calls page2.xsl as action. Every action to the database (except -process) has as result an XML tree. This tree you can transform on page2.xsl and therein send the e-mail with <xsl:variable name="send_mail" select="fmxslt:send_email('[email protected][email protected]&subject=Reservation Added',concat('New Reservation Added for: ',XPath_to_title_of_the_tradebook))"/>
Bryan VonDeylen Posted April 15, 2005 Author Posted April 15, 2005 Would you have a basic example of this? I would like to see the 2 xsl templates with a database of 2 fields (Title, Description). Where Title would be the subject, and Description would be concatenated with the body. Have the email read, "The following email is for you:" and then the Description field. On the web, have an input form to create a new record, and when the record is submitted, send an email to whomever with the Title as Subject and Description concatenated with the a static phrase. With an example like that, I could figure out the rest. I just need a working starting point. I will then post that in my examples page (if you don't mind helping me with this). BTW: You have been very helpful to everyone on this forum. It's great having someone brilliant helping the rest of us.
Bryan VonDeylen Posted April 19, 2005 Author Posted April 19, 2005 Thank you Martin. You are brilliant! I appreciate your help. I will be posting you solution, and my web site soon, as well as how I have incorporated that in my solution.
Bryan VonDeylen Posted April 21, 2005 Author Posted April 21, 2005 I have the information on my xsl help page now. http://www.neenah.k12.wi.us/~bvd/xsl I will be modifying this page with comments, but as of today (4/21/2005) it is available for other to see. Thanks again Dr. Braendle!
Recommended Posts
This topic is 7154 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now