Skip navigation

Jive Developers

3 Posts authored by: robert.fernandes

Let's get to the announcement part first, then we'll deal with the minor update...


The Forms App, Now Pre-Installed for All Jive Cloud and Hosted Instances!


What this means is that all Jive customers can have access to the Forms App, and all its functionality, without requiring users to go the Apps Market and install the app.  The app will be readily, and immediately, available to all users of the site.


This has come about due to the great customer adoption and feedback given to the app which has brought it to this point, after many iterations and updates that have made it what it currently is today.  For example, see the following update announcements, all of which were brought about from ideas from customers like you:



Thanks again for all of the great feedback and support of the app, and as always, continue to provide any feedback for the app, or any questions you may have, here in the [ARCHIVE] Forms App group or in the [ARCHIVED] Apps by Jive! group.


Latest Update


There has been a minor update to the Forms App which has just recently been posted to the Apps Market.  This only affects Jive customers who are using the app but are not running the Jive web application in the root context (your Jive URL looks something like to access Jive, rather than  Now, the page redirect, where you are taken after you create a piece of Jive content, will correctly forward on to the correct page even if you are not running in the root context.  Note that this update requires the Jive v3 API, and only works for versions of Jive 6.0+, which includes all Jive Cloud versions.



Important Caveat:  There is going to be a lot of talk about tags in here, but the tag features will only function properly if the app is being run in an instance which has access to the Jive Core API v3, not just v2.  What that means is, unfortunately, for anyone using this app in Jive 5.0 the tags features will not function, tags will be ignored.  This will only work for Jive 6.0+.


Another month has passed, more feedback was collected, and it was time for yet another update to the Forms App.  Here is a list of the new features that are contained in this latest update:


  • Tags, tags, and tags.  The most requested feature of the app is now available!  Tags now surface in 3 ways within the app:
    • Tags may be specified at the template level, so that any piece of content posted by the app for that template will automatically contain specific tags
    • There is a new form field type, 'tags', which will allow users to enter a set of tags within the form that will be added to the content once posted by the app
    • A default tag, 'fbldr_template' will now be added to all templates created by the app's Template Creator - no more manual intervention of any kind to get the new template out to users of the app
  • List Fields - Two new field types have been added to the template definition - 'list' and 'multi-select'
    • The 'list' field type allows a user to enter a comma-delimited list of values into a textarea, which will then be parsed and converted to a list when the content is created
    • The 'multi-select' field is just a standard HTML select box, that will allow users to select multiple values rather than just one, and will render the selections as a list in the created content
  • List Formatting - Control how a list is rendered within the created content
    • In previous versions, any list (which was only userpicker) would be rendered as a string of values, separated by a ','
    • Now, if the field is a list type (includes userpicker, and the new list and multi-select types) a list-style can be specific to control how the list is rendered in the content
      • Comma (the default, for backward compatibility), ordered (numbered list), unordered (bulleted list), none (bare list)
  • URL Field - New form field type to render a link
    • The URL field type is displayed to the user as a pair of fields - the link label and the link itself
    • Depending on what the user fills in, the link can be output a few different ways
      • User enters label only - only the label is displayed, as simple text
      • User enters URL only - the URL is the text for the link as well as the destination for the link
      • User enteres label and URL - the label is the text for the link and the URL is the destination for the link
  • Conditional HTML Output (if/else)
    • HTML template body can contain a if/else block (else is optional) that will only display in the created output if a user provides a value for an optional field
    • Looks something like this - {if $field} <something here> {else} <something else here> {/if}


And now, more detailed screenshots which show the above new features in action.


New Feature Details


Support for Tags


In the Template Creator, there is a new field labeled "Content Tags."  This is where you enter any tags that will be included on all content created from this template.  This tag field is whitespace/comma delimited, since spaces cannot be included in tag values.



When defining template fields, there is a new field type labeled "Tags for Content."  This renders a plain text field in the form, however rather than use the field value within the HTML output in the content body, the field will be split apart and added as tags to the created content.  Again, the field is split by whitespace/comma, since spaces cannot be included in tag values.



As you can see in the Content Preview below (within the Template Creator), you can see that all 4 tags, the two templates tags (first and second) that have been combined with the user-entered tags (this and that), and have been appended to the content.



When using Jive 6.0+ (required for apps to use tags), once a new template has been created by the Template Creator, a new message will be displayed.  This informs the user that the template has actually been tagged automatically and will be available to all users once the Jive search index has been updated to reflect the newly created template.  If using Jive 5.0, the app will still instruct the user to add a tag to the template, manually, so that the template will be available to the Forms App.


Also see that the proper, default, tag of 'fbldr_template' has been added to the new template.


Important Note:  Even though the default tag of 'fblr_template' has been added, which makes the template available to all app users, the tags can still be manually edited within Jive to control who has the template automatically loaded when the app starts.  See the Forms App User Guide for information on configuring the app's settings in order to control which tags, and hence which templates, are loaded by a user.  This configuration is done manually, by each user individually.


List Fields and List Formatting


The new 'list' field, labeled "List of Values," renders as a textarea and allows a user to enter any number of values, all separated by a comma.  Unlike tags, lists are separated only by commas and not by spaces/commas, so that the list of values may contain values with spaces.  The list style field controls how the list, entered by the user, is rendered in the output.



Here is how the user-entered list values would be rendered in the output as a bulleted list, which was selected in the sample above.



The new 'multi-select' field, labeled "Select Multiple Values," renders as a select list and allows a user to select any number of values from the list.  The list style field controls how the list, entered by the user, is rendered in the output.  The available list of options, from which the user may select, is contained in the "Values" field of the template form, which is just below the option for choosing the list style.



Here is how the user-selected list values would be rendered in the output as a numbered list, which was selected in the sample above.



The other 2 list display options, not shown in any example above are "comma" - the old, default list style as a single string with commas separating the values, and "none" - a list format similar to ordered and unordered but just contains no visible icon or list indicator.


URL Field


A new field type of 'link' which is labeled as "Link / URL" allows a user to enter a hyperlink to another piece of content.  This is made available to the user via 2 separate text fields in the form, one for the link label and another for the link itself.  Note that the "Default Value" for the link field is for the Label, and not for the URL.



When the user enters only the label, then the output is just a bit of simple text.  When the user enters a label and a link, then the output is the text wrapped in the provided link.  These appear very similar in the output, only difference being whether or not the label is simple text or an active HTML link.



When the user enters only the link, then that is used for both the text display label as well as the actual link.



Conditional HTML Output


Rather than defining the specification, we'll use an actual example here to show how this conditional logic works.  Note that the recommended approach for providing the HTML content for a template is to use an external document and place the document ID in the template, and NOT to enter the HTML within the Template Creator as we are doing here.  Only entering the HTML within the app in this example to simplify showing all the output within a single screenshot.


Here is the HTML body that is being supplied to the template:

{if $value}Found {$value}{else}Not Found{/if}


Essentially, this is informing the app that if the template field named 'value' has a value provided by the user, then output the string 'Found <value>', otherwise, if the user did not provide a value, then output the string 'Not Found.'


This is a sample form which contains that HTML, along with a 'title' and 'value' field defined.



When the user provides content for the 'value' field, then this will be the output.  In the above example, "This and That" was entered by the user, which is contained in the output.



When the user does not provide content for the 'value' field, then this will be the output.



Note that the else portion of the conditional is completely optional.  The following conditional statement is also valid, and will just output nothing if no field value is provided.

{if $value}Found {$value}{/if}


What's Next?


The next big feature on the roadmap is to allow users to edit existing templates.  New templates can easily be created by the app, but once a template it created, it must be modified by hand if any changes need to be made.  A future version of the app will add the ability to edit templates that have been previously created by the app.


Any questions, comments, and feedback regarding the app, either with respect to this latest version or future versions, are always welcome.  So please, ask away.



A request was made to try and create a link to an embedded app view, from a piece of content created by the Forms app.  Well, yes, it turns out that this can actually be done...  I am even a little surprised myself, but it can in fact happen and here's how.  This can be done with no change to the app itself, and works as-is, assuming you are on Jive 6+.


How To


1.  Get a reference link from the app you want to link to


  • Create a new piece of content, in which you can utilize the !app functionality
  • From the RTE, perform the !app from the app and get the link into the body
  • Switch the RTE to the HTML view
  • Look for your newly rendered embedded app link, at the time of this writing it looks something like this, for Wikipedia linking to George Washington



<a class="jive-link-app-icon jive_macro jive_macro_appEmbeddedView"


  style="background-image: url('/servlet/JiveServlet/downloadImage/1921703/912085dac9d100cfd2786f126278fc317a845deb.png');"

  title="George Washington"


  data-orig-content="George Washington&lt;span class=&quot;j-ui-elem j-app-link&quot;&gt;&lt;/span&gt;"

  __context="{&quot;page&quot;:&quot;George Washington&quot;}"





  __jive_macro_name="appEmbeddedView">George Washington<span class="j-ui-elem j-app-link"></span></a>



2.  Convert the pertinent data in the link to be generic variable(s)


Depending how complex the context of the app link is, you may need to use more than one form field reference, but in the case of the Wikipedia app, you only really need one field.  In this example the form field is going to have the ID of "subject" so all that needs to be done is to replace all occurrences of "George Washington" with {$subject}, which will look like this:

<a class="jive-link-app-icon jive_macro jive_macro_appEmbeddedView"


  style="background-image: url('/servlet/JiveServlet/downloadImage/1921703/912085dac9d100cfd2786f126278fc317a845deb.png');"



  data-orig-content="{$subject}&lt;span class=&quot;j-ui-elem j-app-link&quot;&gt;&lt;/span&gt;"






  __jive_macro_name="appEmbeddedView">{$subject}<span class="j-ui-elem j-app-link"></span></a>


Again, the amount of data / fields you need to create a link is going to likely vary quite a bit from app to app, and each data value you need in the embedded app link needs to be exposed somewhere in the form.  You could even be a bit tricky and expose 2 fields which separate the label of the embedded link from the data of the link, by replacing the last value (between the <a> tags) with another field, something like:

<a class="jive-link-app-icon jive_macro jive_macro_appEmbeddedView"


  style="background-image: url('/servlet/JiveServlet/downloadImage/1921703/912085dac9d100cfd2786f126278fc317a845deb.png');"



  data-orig-content="{$subject}&lt;span class=&quot;j-ui-elem j-app-link&quot;&gt;&lt;/span&gt;"






  __jive_macro_name="appEmbeddedView">{$linkText}<span class="j-ui-elem j-app-link"></span></a>



In the above case, the app would still pull up an embedded view of the "subject" field of the form but the anchor link text and title would be a second field with ID "linkText" from the form.


3.  Put the generic forms link into a piece of HTML content used by the Forms app


All that has to be done here is to take the link, with the form parameters now included, and put that into some HTML.  The Forms app will look for and replace these {$field} substitutions in the embedded link just as it would in any other part of the HTML in the body.


Taking It for a Spin


Here is a sample template, using the above example, in which there is just one single field in the template, a subject:  Wiki Document Template


Here is the HTML which is used by the template to create a document with an embedded link to the Wikipedia app:  Wiki Document About {$subject}


Here is a sample of a document created by the template, which contains an embedded link to the Wikipedia article on George Washington:  Wiki Document About George Washington


You can use this direct link to the Forms app to point directly to this sample template and try to generate a Wikipedia document of your own.




And that's that...  You can now create a piece of content using the Forms app which actually contains an embedded link to another app.


One important little caveat, especially with Jive Cloud in play, is that updates of Jive may change how this link is formatted so content containing this links may or may not age gracefully through upgrades.  Giving that it patterns off of links created by Jive apps, the hope is that the links will safely live on, but there is no guarantee of that.


Questions, comments, feedback?

Filter Blog

By date: By tag: