Musings

ExpressionEngine plugin - retrieve custom field info in your templates (saef)

14th January 2010

ExpressionEngine plugin - retrieve custom field info in your templates (saef)

This plugin will let you retrieve all custom field info for use in stand alone entry forms or anywhere else. If the field has options there’s a variable pair for that. There’s no restriction on formatting either so you’re free to use it how you will.

The project is available on GitHub publicly, feel free to donate via Pledgie if you have the inclination!

Example usage for a text field

{exp:linssen_saef_field name="my_text_field"}
  <p><label for="{id}">{label}</label><br />
    <input type="text" name="{id}" id="{id}" value="" />
  </p>
{/exp:linssen_saef_field}

Example usage for a relationship field:

{exp:linssen_saef_field name="my_relationship_field"}
  <p><label for="{id}">{label}</label><br />
    <select name="{id}" id="{id}">
      {options}<option value="{value}">{name}</option>{/options}
    </select>
  </p>
{/exp:linssen_saef_field}

Discuss

Get involved in the discussion by using the comment form below.

hh

25th February 2010

nice

outline4

2nd March 2010

this sounds too good to be true!
will be testing this, tomorrow…
just a quick question: will it display {field_instructions} texts aswell?

cheers
stefan

Wil Linssen

2nd March 2010

@outline4 ask and ‘ye shall receive. I’ve updated the GitHub page to include field_instructions. Just use the single variable {instructions}.

outline4

2nd March 2010

*lol* this is GREAT!

caugh… one thing I always missed in saef is the pendant to solspace’s form helper plugin’s field_parser, and categories… but I’m a saef noob and maybe there’s other solutions to do this kind of thing…

I will be heavily depend on your relationship field function! thanks!

icebreaker

8th April 2010

Will the plugin work in an edit form? With value=”{value}” ??

Wil Linssen

9th April 2010

@icebreaker it should work anywhere, it’s not restricted to SAEF, let me know if you run into any problems.

icebreaker

11th April 2010

Thanks for the plugin & help—together with FieldFrame fields your plugin makes the construction of SAEFs and SAEF entry forms a lot easier.

Format showing up

19th April 2010

When editing I sometimes get html formatting included into the linssen_saef field. Is there a way to specify the format as “none”.

Wil Linssen

19th April 2010

Not as yet, feel free to add it as an issue. Otherwise, I’d suggest using the HTML Strip plugin. You should be ok, you might have to perhaps tinker with parse order.

icebreaker

19th April 2010

OK - thanks for the info.

Christopher Robert Kennedy

3rd May 2010

Hey Wil,

Thanks for this great plugin! It saves me loads of time. However, when I’m adding items to an “edit” SAEF, though I can access the content to change, I can’t seem to get the changes to post. Previously I was working under the understanding that I had to use the fieldset_ids in order to get this to happen. Is there any way to add that functionality on the next build?

Thanks again!

icebreaker

3rd May 2010

The plugin works fine with SAEF-edit. Using html strip takes care of any unwanted formatting. (EE 1.6.8 &MSM;). I doubt your problem has anything with the plugin to do.Note that you have to include some hidden fields at the beginning of the entries loop in an edit-SAEF. These are explained in the documentation for the field grabber plugin.

icebreaker

31st May 2010

Update on using the plugin with SAEF-edit forms:

As mentioned in a previous post, the plugin fails to safeguard the formatting information assigned when defining the custom field.

Using html-strip as a work-around works in many cases, but in others the hack generates a new set of problems ..

E.g. when a name contains foreign characters. These are stripped from the field along with the un-wanted XHTML wrapping. Would like to be able to specify formatting “none”.

mark

6th July 2010

No doubt expression engine is one of the best CMS.I decided to use it in my recent new website.
car loan modification

Leave a comment

Your email is never ever shared, and required fields are marked with *

*

*

Used for Gravatars



Sorry folks, uses the "nofollow" attribute

*


My apologies for this nonsense: please type the word you see below.



Copyright © 2009 Wil Linssen all rights reserved

Wil-Linssen.com is powered by ExpressionEngine: it's good, go and get it.