Skip to main content

Dynamic text in form title and form text

Comments

9 comments

  • Stefan Schweigert

    Hello Andrew,

     

    You can set the form header by using the Set Form Element Property with an Element ID of header and the Property Name title. This can be included in any event within the current form. In the below image, I've created a change event on a CheckBox which will trigger the title change.

     

    Capture

     

    Thanks, Stefan

    1
  • Stefan Schweigert

    In the case of changing text, you would use description as the Property Name.

    0
  • Permanently deleted user

    Thanks Stefan, I have managed to get it working on the load event. I think I was having trouble before because I thought the property name needed to start with a capital, like it is shown in the workflow designer, instead of lower case.

    0
  • Permanently deleted user

    Hi Stefan

     

    I have the same problem - in the documentation of the image form element,I'd like to set the image url property - is there an API documentation to look up the required spelling of the property?

     

    Thank you

     

    Helen

    0
  • Permanently deleted user

    Meaning, in the documentation the image url is two words, but that's probably not what JavaScript needs here?

    0
  • Stefan Schweigert

    Hello Helen,

     

    The Image URL corresponds to the 'value' property. In order to change the Image, you can use a "Set Form Element Property" using the value Property Name and the Uri specified in the Property Value.

     

    Thanks, Stefan

    0
  • Permanently deleted user

    Hi Stefan, I understand that the value can be something like http:\\... or =$myURL, but I have difficulties filling in the Property Name (required) field - I tried Image Url and other spellings like imageurl, but no luck so far?

    0
  • Permanently deleted user

    Hi Stefan

     

    I seem to be missing a link here. I tried your example from above - when any button of a display form is clicked, the title is changed in the click event and an alert pops up. However, even though the subworkflow is executed, the title does not change. Tested in the sandbox.

     

    I'd be really thankful if you cold point me to what I'm missing.

     

    Thank you,

     

    Helen

     

    {"components":[{"steps":[{"inputs":{},"transitions":[{"inputs":{},"id":6,"target":{"id":4},"position":"90,60 90,170 100,170 100,190"}],"id":3,"purpose":"start","title":"Start","position":"0,0"},{"inputs":{"form":{"accessors":[],"code":"resources.forms[values.id]","values":{"id":5}}},"id":4,"action":"gcx:wf:forms:form:DisplayForm","position":"-20,190","title":"Display Form","name":"form1"}],"id":2},{"steps":[{"inputs":{"text":"clicked"},"id":15,"action":"gcx:wf:ui::Alert","position":"-10,340","title":"Alert"},{"inputs":{},"transitions":[{"inputs":{},"id":13,"target":{"id":12},"position":"90,60 90,200 100,200 100,220"}],"id":8,"purpose":"start","title":"Event","position":"0,0"},{"inputs":{"form":{"accessors":["$$form"],"code":"$$form","source":"$$form"},"elementName":"header","propertyName":"title","propertyValue":"NEW TITLE"},"transitions":[{"id":16,"target":{"id":15},"position":"100,250 100,320 110,320 110,340","sourceConnector":"bottom"}],"id":12,"action":"gcx:wf:forms::SetFormElementProperty","position":"-20,220","title":"Set Form Element Property"}],"id":7,"title":"click-footer"}],"forms":[{"defaults":{},"elements":{"header":{"type":"Header","section":"header","title":{"markdown":"Form Title"}},"footer":{"enabled":true,"type":"ButtonBar","items":{"0":{"index":0,"label":"Submit","value":"submit","validates":true,"default":true},"1":{"index":1,"label":"Cancel","value":"cancel","validates":false}},"section":"footer"}},"id":5}],"transitions":[{"inputs":{},"id":9,"source":{"id":4},"target":{"id":8},"branch":"clicked$footer"}],"start":{"id":3},"licenseInfo":{"licenseeId":"0016000000LLovaAAD"}}

    0
  • Stefan Schweigert

    Hello Helen,

     

    The syntax I mentioned is specific to GVH; you've got the correct workflow configuration.

     

    WAB currently does not update the title, we are aware of this issue and its currently listed in our backlog.

     

    For the Image URL, the Property Name is 'value', without the apostrophes.

     

    Thanks, Stefan

    0

Please sign in to leave a comment.