How can I add a form to a page using User Profile Fields as elements and having a submit button?
-
[edited by: ibrahimk at 4:16 PM (GMT 0) on Thu, Jun 4 2020]
How can I add a form to a page using User Profile Fields as elements and having a submit button?
1. What do you mean by 'non-selectable inputs'?
When defining the profile fields, do not identify them as having selectable values, instead, choose "Plain Text" or "Number" as the data type. Because the selectable values will not be defined with the profile field, the profile field itself will not be able to validate the selection is valid, so the field should not be defined as selectable.
2. What URL would the form post to ?
The form itself is HTML+JavaScript+CSS. You could implement the save in JavaScript and save values to the REST endpoint
passing the values in the same format outlined above ( _ProfileFields_FIELDNAME = 'FIELDVALUE' ).
3. How would the field values be retrieved from the database? Can they be in their own custom tables?
How you populate the selectable values would then be up to you. You could define them in javascript or load them from the database (either way you're maintaining those options and how to present them). There are not APIs to support interacting with the database directly, however, so you'd need to implement your own APIs ( see https://community.telligent.com/community/11/w/developer-training/65065/widget-extensions to create a script/widget extension or https://community.telligent.com/community/11/w/developer-training/65113/exposing-data-to-external-sources to create a REST endpoint to consume via JavaScript on the client side) to either expose the options to scripts/widgets or to the client browser via REST.
If you could provide a bit more information about the structure of the form, that would be appreciated..
The form itself would be HTML+JavaScript+CSS. Generally, this would consist of a custom widget where:
Okay, thanks.