ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SAEF custom field label

August 03, 2010 2:57am

Subscribe [4]
  • #1 / Aug 03, 2010 2:57am

    fiunary

    65 posts

    This question may be related to a resolved thread.

    Hi,

    I am using EE 2.1

    I am using the following in an SAEF form.

    {custom_fields}
    {if required}* {/if}{field_label}
    {field_instructions}
    {formatting_buttons}
    {field_instructions}
    
    {if textarea}
    
    <textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}">{field_data}</textarea>
    
    {/if}
    
    {if textinput}
    
    <input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" size="50" />
    
    {/if}

    etc..

    the tag is applied to the field and not the label so the two get split on the page.

    Is there a simple way round this?  Seems strange.

    Thanks,  Alex

    [Mod Edit: Moved to the CodeShare Corner forum]

  • #2 / Aug 03, 2010 4:17am

    John Henry Donovan

    12339 posts

    Alex,

    the tag is applied to the field and not the label so the two get split on the page.

    I am not sure I am following. Which tag are you referring to? What gets split up? Can you show a rendered example of what you mean?

  • #3 / Aug 03, 2010 5:18pm

    fiunary

    65 posts

    sorry I should have been more explicit.

    I am talking about the tag.  eg

    
    <textarea id="{field_name}" name="{field_name}" dir="{text_direction}" cols="50" rows="{rows}">{field_data}</textarea>
    

    Which is returning:

    * place
    
    
    <input type="text" dir="ltr" id="field_id_18" name="field_id_18" value="" maxlength="128" size="50" /></p>

    for example where place is the field label.

    This puts place in a completely different place on the page.

    There is also a lot of white space in the html generated.

    Thanks,  Alex

  • #4 / Aug 04, 2010 3:41am

    John Henry Donovan

    12339 posts

    fiunary,

    Thanks for the detail. Unfortunately this is how it renders by default. As per related thread you are able to build out those custom fields for your self. Check this Wiki article for more detail

  • #5 / Aug 06, 2010 9:28pm

    fiunary

    65 posts

    Thanks.  I have followed the guidance on the wiki page and it works.  I am finding though that tags like {formatting_buttons}
    do not work if they are not wrapped in the {custom_fields} tag.  What am I doing wrong?  Help very much appreciated.  Alex

  • #6 / Aug 07, 2010 4:51pm

    Greg Salt

    3988 posts

    Hi fiunary,

    The SAEF tags are designed to work as described in the docs therefore you may have to find another way of generating the output you need. I’ll move this thread into the CodeShare Corner forum since it is more appropriate there now.

    Cheers

    Greg

  • #7 / Aug 07, 2010 5:21pm

    fiunary

    65 posts

    Does this mean the wiki entry I was pointed to is wrong?

  • #8 / Aug 08, 2010 3:20pm

    Greg Salt

    3988 posts

    Hi fiunary,

    Not necessarily but the Wiki is for community contributed articles, hints, tips and tutorials and not all the information may be relevant to your particular installation. For example, the Wiki article was pointed out to you as an example but the original article was written for EE 1.x and not 2.x.

    Cheers

    Greg

  • #9 / Aug 08, 2010 3:54pm

    fiunary

    65 posts

    Thanks Greg. The issue here then may be the docs which are far from clear in this instance.  Do input fields in SAEF forms need to be wrapped in the {custom_fields} tag in order to render?

  • #10 / Aug 09, 2010 2:26am

    John Henry Donovan

    12339 posts

    fiunary,

    Do input fields in SAEF forms need to be wrapped in the {custom_fields} tag in order to render?

    Not as far as I know. You will however need the correct field ids though as per the Wiki article.

    Adding {formatting_buttons} should also work. Do not use the {custom_fields} tag

  • #11 / Aug 12, 2010 7:57pm

    fiunary

    65 posts

    Thanks John.

    I am not sure whether this worts in v2?

    My custom SAEF works fine it is just the EE tags I am having problems with.

    I have {formatting_buttons} tag wrapped in {exp:channel:entry_form channel="snippets" return="site/index" preview="site/entry"}

    I only get the buttons displaying if I add the {custom_fields} tag (obviously this messes up the custom fields).

    There must be lots of others out there using custom SAEF with {formatting_buttons}?

    Alex

  • #12 / Aug 13, 2010 10:27am

    Ingmar

    29245 posts

    Formatting buttons are only available for (and within the scope) of custom fields. Feel free to make an FR to have this changed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases