Home › Forums › General discussion › Required Star Position
- This topic has 8 replies, 2 voices, and was last updated 5 years, 5 months ago by Wilson.
-
AuthorPosts
-
-
May 23, 2019 at 17:42 #25418
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…
-BobAttachments:
-
May 25, 2019 at 12:23 #25456
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
-
May 29, 2019 at 14:57 #25509
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 -
May 29, 2019 at 19:54 #25514
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
-
July 24, 2019 at 15:32 #26248
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,
BobAttachments:
-
July 25, 2019 at 09:39 #26257
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
-
July 25, 2019 at 13:28 #26263
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 -
July 26, 2019 at 08:27 #26273
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
-
July 26, 2019 at 21:07 #26291
That did the trick…
Thanks Alex,
Bob
-
-
AuthorPosts
- You must be logged in to reply to this topic.