Results 1 to 7 of 7

Thread: Custom Field

  1. #1
    Join Date
    May 2008
    Location
    West Midlands, UK
    Posts
    32

    Default Custom Field

    Hi

    Is anyone experiencing the same as me?
    I have created a custom IMAGES field and entered the following in the Text description so that front-end users will know what they are supposed to enter:

    Add Your Logo or Product Image

    This description appears in the back-end admin area when adding links but it does not appear in the front-end form.

    The web browser source code for this custom field is:

    <div>
    <label></label>
    <label class="f_entry"><input class="text3" type="file" name="image" /></label>
    </div>

    As you can see there is nothing between <label></label>

    Regards
    Millards
    Last edited by Millards; 05-17-2008 at 11:35 AM.

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    The following code would be correct

    <div>
    <label></label>
    <label class="f_entry"><%$images%></label>
    </div>

  3. #3
    Join Date
    May 2008
    Location
    West Midlands, UK
    Posts
    32

    Default

    I would have thought the description which I entered in the Text Box when creating my custom field would appear between the first opening and closing label tags. In my case this would be : Add Your Logo or Product Image.

    <div>
    <label>Add Your Logo or Product Image</label>
    <label class="f_entry"><%$images%></label>
    </div>


    The code which appears in add_form.html to generate my custom field is:

    <%$custom_field_form%>

    This generates the custom field but there is no description generated so that a user knows what the field is.
    Last edited by Millards; 05-17-2008 at 01:13 PM. Reason: Extra info

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    If you remove custom_form_field and use the code I provided then it will work the way you want.

  5. #5
    Join Date
    May 2008
    Location
    West Midlands, UK
    Posts
    32

    Default

    I have now removed <%$custom_field_form%> (which was originally generated by IndexU) from add_form.html and replaced it with:
    <div>
    <label></label>
    <label class="f_entry"><%$images%></label>
    </div>

    There is now nothing at all displayed for a custom field.

  6. #6
    Join Date
    Oct 2007
    Location
    Sydney
    Posts
    652

    Default

    Quote Originally Posted by Millards View Post
    I have now removed <%$custom_field_form%> (which was originally generated by IndexU) from add_form.html and replaced it with:
    <div>
    <label></label>
    <label class="f_entry"><%$images%></label>
    </div>

    There is now nothing at all displayed for a custom field.
    Try this;

    <div>
    <label>Image</label>
    <label class="f_entry"><input class="text3" type="file" name="image" value="<%$image%>" /></label>
    </div>

  7. #7
    Join Date
    May 2008
    Location
    West Midlands, UK
    Posts
    32

    Default

    Hi Mitchell

    You are a lifesaver - everything is appearing as it should.

    What I don't understand is why IndexU only places the input field together with the browse button but not the description e.g. Image. It does this with <%$custom_field_form%> in add_form.html and the source code in the browser is converted to:
    <div>
    <label></label>
    <label class="f_entry"><input class="text3" type="file" name="image" /></label>
    </div>

    There is obviously something missing in the original html code.
    What this means is if someone is creating a custom field they have to have the knowledge to go into add_form.html and manually over-ride the code which has been generated by IndexU.

    In admin back-end the description and input field are generated correctly for custom fields.

    Anyway, Thank You again for putting me on the straight and narrow.

    Regards
    Millards

Similar Threads

  1. Custom field
    By giannisff in forum v5.x
    Replies: 1
    Last Post: 03-16-2008, 09:02 PM
  2. Custom field
    By saj in forum v5.x
    Replies: 9
    Last Post: 12-15-2007, 09:42 AM
  3. Custom Field
    By GodParadise in forum Tutorials, Hints & Tips
    Replies: 0
    Last Post: 04-07-2007, 12:15 AM
  4. Custom Field
    By cegerxwinn in forum v5.x
    Replies: 3
    Last Post: 01-27-2007, 08:19 PM
  5. How to add new custom field
    By jacob in forum v5.x
    Replies: 2
    Last Post: 08-08-2002, 10:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •