Link Array Formtool

Ever wanted to allow users to capture a bunch of links in a property that you can output?  You could always use the FarCry CMS Link content type, but its a bit unwieldy, especially if your links are really only related to one specific content item and don't make sense in a library.  Well you are in luck :)

Blair has put together a great little "formtool" that captures links and their labels with a nifty jQuery UI, and stores them in a WDDX packet. Deploy it in your project by creating a folder called ./[myprojectnamehere]/packages/formtools and saving the linkwddx.cfc file. Then you can apply the formtool to any longchar property you may have in a content type.

https://gist.github.com/240003

And the result:

PS. the jQuery plugin we're using seems to have some quirkiness with WebKit, so you may notice in the code that there is a less elegant method of rendering the UI for Safari et al 

2775 views and 4 responses

  • Nov 20 2009, 10:16 PM
    Geoff Bowers responded:
    Have added a page for this in the WIKI under "Code By Example":
    http://docs.farcrycms.org/display/FCDEV50/Link+Array+Formtool
  • Nov 1 2010, 12:59 PM
    Trond Ulseth responded:
    While I got it to work with minimal tweaking, it is not looking as nice. The styling of the table and also the add and delete icons are not present. I'll investigate some more tomorrow, but if someone has some good advice in the meantime that would be nice :)

    We are running FarCry 6.0.6

  • Nov 1 2010, 3:15 PM
    Blair responded:
    We used icons from here: http://www.famfamfam.com/lab/icons/silk/

    I'm not sure what the styling problems are. It's just using the standard webtop css.

  • Nov 2 2010, 4:20 AM
    Trond Ulseth responded:
    We needed to add the class objectAdmin to the table. Then it became pretty as yours :)