Category Archives: Form modification

Dynamic Forms for SharePoint: Now with side-by-side

Change log
May 06. 2013
I have released v2.95 – you find it here
April 28. 2013
Bugfixes in v2.94:

  • Fixed a bug regarding comparing date and time columns where the trigger column is empty.

April 14. 2013
Bugfixes in v2.93:

  • Fixed bug in validating required rich text field when using non English letters.
  • Fixed bug where fields appearing in the “orphan fields tab” when using Side by Side.
  • Prevented the ID column from appearing in the “orphan fields tab”.
  • Fixed bug where people pickers lost their value in EditForm in Chrome (and possibly other non-IE browsers).

There are changes in both “DynamicFormsForSharePoint_v2.js” and “default.css” – ensure you update both.

March 29. 2013
Bugfixes in v2.91:

  • Fixed bug in side-by-side functionality regarding the “fields” not getting the correct fieldtype and fielddispname attributes.
  • Fixed bug where the field label was repeated multiple times when combining side-by-side with readonly, and then switching tab.

I have released version 2.90 of Dynamic Forms for SharePoint with these changes:

  • Added content type choice as possible trigger field.
  • Added side-by-sice capabilities.
  • Fixed a bug where the link to add tabs were missing for the first setup.
  • Changed the function that dynamically resizes the dialog. This new function is created by Sing Chan, and can be found here
  • Added a fix for some occurrences where the variable L_Menu_LCID was missing in a SP2013 setup.
  • Fixed a bug in SP.UI.RTE.js that occurs when hiding rich text columns in SP2010. The workaround is provided by John Chapman.

Refer these articles for background information and setup instructions:
Dynamic Forms for SharePoint: Production
Dynamic Forms for SharePoint – Now with Tabs
Dynamic Forms for SharePoint: Now with support for SharePoint 2013

How to use the Content type as trigger

In NewForm and DispForm the content type is not visible other than in the URL. You must use the trigger “URL Query string parameter”, and “This value” like this:

ContentTypeId=YourContentTypeID

Please note that the default content type id not always shows up in the URL. If you click the “New Item” in the ribbon (in SP2010), it is included, but if you click the “Add new item” below the list view, it is not. You should therefore add rules for the “not default content type”.

How to find the ContentTypeId
Go to list settings, click the content type you want the id from, and then look at the URL. You will find it like this:

ctype=0x010300E461AB843CED5C47B6795DF8C440401A

In EditForm, you can select the content type select ine the trigger fields and address it by its display name.

Details on the side-by-side functionality

I have added an option to place fields side-by-side in the tabs like this:
IMG

The configuration is setup like this:
IMG

The yellow input fields is used to specify a common index number for the fields that are to be presented side-by-side. The fields will be lined up with the topmost field in the selection.

The checkbox is used to hide the form label for the fields like this:
IMG

Please consider the side-by-side functionality BETA, and report any bugs back to me by adding a comment below.

Alexander

vLookup now supports SharePoint 2013

Change log
June 19. 2013
Changes in v1.47

  • Added {currentSite} as option in “List base URL” to dynamically use the current sites base url. Use this if you plan to save the site as a template.

May 15. 2013
Changes in v1.45

  • Numbers are now aligned right.

May 14. 2013
Changes in v1.44

  • Added formatter for percentage in the viewfields: {“percentage”:true,”suffix”:”%”}
  • Applied “toLocaleString” to numbers that are not formatted as “percentage”.

May 13. 2013
Changes in v1.43

  • Fixed bug related to Dynamic Forms for SharePoint and reloading form when creating a child element.
  • Fixed a bug regarding prefix and suffix for currency and number columns. Suppresses the prefix / suffix if the field is empty.

Added event hooks:

To have something done before a child element is creates, add a function with this name: “vlookupAddChildPreCheck”
This function must return true to procede with the add child action.

To have something happen after a child had successfully been added, add a funcion with this name: “vlookupChildAddedCallback”
This function must return true to procede with the updating of the “vLookup child table” in the form.

To have somethng happen after the vLoolup solution has finished loading the “Add new item button”, add a function with this name: “vLookupIsLoadedCallback”

I have upgraded the vLookup solution to support SharePoint 2013. I have not dissected SP2013 fully, and therefore you might find some bugs regarding the SP2013 support. Please post any bugs or suggestions below, and I’ll address them as soon as I can manage.

Read this article for setup instructions and download instructions

Besides adding SP2013 support, his version also features some new features:

  • Added option to write your own CAML-query freehand
  • Added dateFormat option to specify the returnvalue for a date and tinme column using a string like this: yyyy-MM-dd HH:mm:ss

IMG

Post any comments below,
Alexander

Dynamic Forms for SharePoint: Now with support for SharePoint 2013

Change log

May 06. 2013
I have released v2.95 – you find it here

March 19. 2013
v2.81 fixes a bug occurring when you set a boolean column as required.

March 01. 2013
I have released v2.8 with some new features, and a few bugfixes.
New features:

  • Add the ability to insert custom CSS and JavaScript (in the Misc tab)
  • Added “URL Query string parameter” as trigger for a rule.

Bug fixes:

  • Validating an empty lookup column with the text (none) failed. This has been fixed by checking the val() property which will be 0.
  • “showFieldDescriptionWhenReadonly” had a bug preventing it from functioning.
  • If you selected the same field twice in a tab, it misbehaved. I now strip away any duplicates by removing the last occurrence.

IMG
Refer these articles for background information and setup instructions:
Dynamic Forms for SharePoint: Production
Dynamic Forms for SharePoint – Now with Tabs

The Dynamic Forms for SharePoint solution now supports SharePoint 2013. Please note that I have just started looking at SharePoint 2013, and have tested the solution in a “Microsoft Office 365 Developer Preview” only.

There might be issues with a “non office 365” install, but you will have to tell me about it in the comments section below.

The code is shared between SharePoint 2007, SharePoint 2010 and SharePoint 2013.

Changes from v2.65

  • Fixed bug where the tab setup link is missing in initial setup.
  • Added “show field description when readonly” switch under “Misc” section.
  • Added support for SP 2013.
  • Small change to the file default.css to remove form background color in SP 2013 (goes better with the SP 2013 look).
  • Added error handling when using invalid characters in the custom css setup in the heading configuration and including.
  • Added support for rules comparing date columns against other date columns in the form, or validation of empty / not empty date columns.

Setup
The setup for SP 2013 is similar to that for SP 2010. Please note that you need to update spjs-utility.js to use Dynamic Forms for SharePoint v2.7 – not only for SP 2013: get spjs-utility.js here.

See change log where you download spjs-utility.js. For setup instruction, see the first article linked in the top of this article.

Please post any findings below this article.

Please support my work by buying me a beer

PayPal