|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Adding form elements to form toolsHello there, Can anyone please tell me if it is possible to add your own form elements to form tools and have them render with all the other form elements. Here is an example of what i am trying to do. <ft:form> <ft:object stObject="#stCustomer#" typename="Customer" format="edit" lfields="title,firstName,lastName,emailAddress,phoneNumber" intable="false" includefieldset="true" legend="Your Details"/> <ft:object stObject="#stBillingAddress#" typename="Address" format="edit" lfields="postcode,houseName,houseNumber,flatNumber,street,city,county" intable="false" includefieldset="true" legend="Billing Address"> <cfoutput> <div class="fieldAlign"> <input type="checkbox" name="bDelivery" class="formCheckbox " id="bDelivery"/> </div> <br class="clearer" /> </cfoutput> </ft:object> <ft:object stObject="#stDeliveryAddress#" typename="Address" format="edit" lfields="postcode,houseName,houseNumber,flatNumber,street,city,county" intable="false" includefieldset="true" legend="Delivery Address"/> <ft:farcrybutton value="Cancel" /> <ft:farcrybutton value="Next" /> </ft:form> The problem here is that bDelivery doea not render nicely like all the other form elements. Thank you for any help in advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Adding form elements to form toolsThere isn't at the moment, but I agree that there should be. What you have to do at the moment is copy the source html for one of the other formtools and wrap it around your own elements.
Blair
On Tue, May 6, 2008 at 7:04 PM, Gavin Stewart <gavin.stewrat@...> wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Adding form elements to form toolsOn May 6, 7:04 pm, Gavin Stewart <gavin.stew...@...> wrote: > <cfoutput> > <div class="fieldAlign"> > <input type="checkbox" name="bDelivery" class="formCheckbox " > id="bDelivery"/> > </div> > <br class="clearer" /> > </cfoutput> > > The problem here is that bDelivery doea not render nicely like all the > other form elements. Why not add a property to the content type of bDelivery? -- geoff http://www.daemon.com.au/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Adding form elements to form tools> Why not add a property to the content type of bDelivery? Will I then be able to add an 'onclick' event and add my own javascript? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Adding form elements to form toolsOk, I have figured out that i can create my own custom form tools types and put whatever html i want in the edit method of that component. The problem i am getting now is that the edit method in my custom form tool type doesn't seem to be getting called. I have tried updating the app several times with no luck. Is this a known bug? Here is my custom form tool type. <cfcomponent extends="farcry.core.packages.formtools.field" name="postcode" displayname="postcode" hint="Used to liase with webskin type fields"> <cffunction name="init" access="public" returntype="farcry.plugins.farcry_vanillaCheckout.packages.formtools.postcode" output="false" hint="Returns a copy of this initialised object"> <cfreturn this> </cffunction> <cffunction name="edit" access="public" output="true" returntype="string" hint="this will return a string of formatted HTML to enable the user to call a post code finder and populate the required address fields"> <cfargument name="typename" required="true" type="string" hint="The name of the type that this field is part of."> <cfargument name="stObject" required="true" type="struct" hint="The object of the record that this field is part of."> <cfargument name="stMetadata" required="true" type="struct" hint="This is the metadata that is either setup as part of the type.cfc or overridden when calling ft:object by using the stMetadata argument."> <cfargument name="fieldname" required="true" type="string" hint="This is the name that will be used for the form field. It includes the prefix that will be used by ft:processform."> <cfsavecontent variable="html"> This is a test </cfsavecontent> <cfreturn html> </cffunction> </cfcomponent> Thanks again for any help Cheers Gav --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Adding form elements to form toolsLooks ok to me. Make sure the ftType of your property that you want to use with this formtool is correct.
Also, make sure the plugin has been included in your project (farcry_vanillaCheckout) Also, you might want to make sure you can invoke the formtool directly to ensure there are now syntax errors. ie. <cfset o = createObject("component", "farcry.plugins.farcry_vanillaCheckout.packages.formtools.postcode") /> <cfdump var="#o#" /> Kind regards -- -- Matthew Bryant Product Development Manager Daemon Internet Consultants Adobe Solutions Partner p. 02 9380 4162 f. 02 9380 4204 On 08/05/2008, at 1:57 AM, Gavin Stewart wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Adding form elements to form toolsThanks heeps for yas help, got it sorted - was my own stupid fault i had my custom form tools type in the wrong cfproperty tag doh! Cheers Gav --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "farcry-dev" group. To post to this group, send email to farcry-dev@... To unsubscribe from this group, send email to farcry-dev-unsubscribe@... For more options, visit this group at http://groups.google.com/group/farcry-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |