Required Star Position

Forums General discussion Required Star Position

This topic contains 8 replies, has 2 voices, and was last updated by  Wilson 2 months, 2 weeks ago.

  • Author
    Posts
  • #25418

    Wilson
    Participant

    Hi Alex,
    It seems when I have a required field and use the Side by Side options, the “Red Required Star” is placed in the table row in front of the lookup field, and not appended to the form label? Is this something I can control and get back on the form label so that it doesn’t offset that Lookup field?

    Thanks in advance…
    -Bob

  • #25456

    Alexander Bautz
    Keymaster

    Are you using the the “Add a custom field label to a side-by-side section” in the Side-by-side settings tab? – if you do, the red star is prepended to the “body” of the field and not the custom label. In your case, I don’t see why you need to use the side-by-side settings when you only have one field in each row, but if you for some reason need to use it you should use the SBS label position = Left and the Stretch side-by-side fields over both form columns checked in the Side-by-side settings tab.

    Alexander

  • #25509

    Wilson
    Participant

    Hi Alex,
    I am using the SBS so that I can append the “icons/buttons” behind the field.

    
    
    function fnNextActionToolStrip()
    {var html = "<HTML that includes buttons/>";
        jQuery("#sbs_Field_NextActionContact").after("<td>"+html+"</td>");
    }

    If there is a better way where I don’t need to leverage the SBS in this scenario, please let me know.

    Thanks as always!,
    Bob

  • #25514

    Alexander Bautz
    Keymaster

    You can use something like this to add it directly without the need to use sbs:

    // Example HTML - change to whatever you like
    var html = "<span><img style='margin:2px;vertical-align:middle;' src='/_layouts/images/hhelp.gif'><img style='margin:2px;vertical-align:middle;' src='/_layouts/images/edititem.gif'></span>";
    jQuery("#dffs_NextActionContact select").after(html);

    Alexander

  • #26248

    Wilson
    Participant

    Hi Alex,
    This works great in most cases (ie…plain text boxes, SPJS Lookup fields, etc…), but when applied after an AutoComplete field, it seems to duplicate the icons? Is there a different syntax for adding to AC fields?
    Thanks,
    Bob

  • #26257

    Alexander Bautz
    Keymaster

    The autocomplete solution inserts another input tag in the field and therefore your snippet will insert two sets of icons. Use this modified snippet to ensure it only applies once:

    jQuery("#dffs_CustomerContact input:first").after(html);

    Alexander

  • #26263

    Wilson
    Participant

    Hi Alex,
    This doesn’t seem to work. It doesn’t insert anything.

    DFFS Version v4.4.3.60
    SPJS-Autocomplete plugin v1.6.28

  • #26273

    Alexander Bautz
    Keymaster

    Sorry about that – I wrote that freehand on my mobile and did not test it. Change it like this:

    jQuery("#spjs_ac_CustomerContact").after(html);

    Alexander

  • #26291

    Wilson
    Participant

    That did the trick…
    Thanks Alex,
    Bob

You must be logged in to reply to this topic.