Inserting links using a template (YouTube link, patternString)
The patternString field type allows you to enter a certain field in a certain format (for example, a link to Youtube) and output a markup with the code from this field in the form of some markup in a certain form (for Youtube, this is an iframe with a YoutubeID).
An example can be viewed here below - All fields of the form
A person inserts a link to YouTube and gets a visualization. The platform extracts a certain string and the initial input string from the template and substitutes it in a special markup.
How to implement it:
1. Specifying the type Line by template (patternString)
2. In getItem, we specify the initial value in the form "Source line||value", where Value is, for example, this is youtubeID
We also specify options_ for the field in which we specify an array of templates (regular expressions) and & nbsp;makeup-markup with the insertion of the variable {value}, which will be replaced by value from the input line.
-- GetItem for form
SELECT
--'https://www.youtube.com/watch?v=HTNlwdYBef4||HTNlwdYBef4' s50,
'https://youtu.be/HTNlwdYBef4||HTNlwdYBef4' s50,
'{"templates": [".*?v=(.*)$", "https://youtu.be/(.*)$"], "makeup": "" }' options_s50
Note:
- the example shows 2 url templates for Youtube links.
- if several templates are suitable, the last suitable template will be applied.
- in templates, some characters are replaced with their html counterparts (for example, & is replaced with &), keep this feature in mind
3. In saveItem, we get this field in the form of "Source string||value", which can be parsed using the function dbo.str_splitPart
-- saveItem
set @inputString = dbo.splitPart(@val, '||', 1)
set @elementID = dbo.splitPart(@val, '||', 2)
Thus, it is possible to process various data in a certain format and through templates to visualize them immediately on the form in the form of a certain markup.
- Management
- Falcon Space Foundation
- Basic components
- Falcon Space Features
- Коммуникация с пользователем
- Дизайн, стилизация
- Integrations
- Каталоги
- Навигация
- Документы
- Additional component
- Продвижение, SEO
- Системные моменты
- HOWTO
- HOWTO Tables
- HOWTO Forms Forms. How do I accept multiple incoming parameters instead of just one parameter(itemID)? Shapes. How to create a form for editing an entity Forms. How to make custom HTML markup for a form (jsRender) Forms. How to make a search for a field, i.e. a list with a search through a database access (autocomplete) Forms. How to set some fields in the form by default when loading Forms. How to display different data on the same form for different roles Forms. How to display a list of check marks in the form (multiple field selection) Forms. How to display and save a multiple list through a chosen field. Forms. To reload a page after saving Forms. How to add a callback after loading the form and after saving the form. Forms. How to dynamically change the column type when rendering a form. Forms. How to make a modal form (opens in the dialog box) Forms. How to update a table (or form) after calling a modal form Forms. How to display a form in a pop-up window near to the button (popover) Forms. How to make dependent fields in a table (Country, City) Forms. How to select an address and save location coordinates (lat,lng). Forms. How to correctly process prices (fractional numbers) on the form Forms. How to display list data or a table inside a form Forms. Setting the background panel for a form Forms. How to pass a hidden parameter to a form Forms. How to make select and chosen lists with categories (optgroup) Forms. How to make a form as a step master Forms. How to show the progress of filling in the form (ProgressBar of filling in the form) Forms. How to use Checkboxes and select radio with picture Forms. How to make fields with animated values (rotating numbers, digits). Forms. How to edit the text of HTML elements in the Rich editor Forms. How to display a table in the modal window Forms. How to use the Select files field in the form Forms. How to hide / show update area on a page when changing a form field Forms. How to work with the Timer field Forms. How can I send a hidden parameter to a form in SaveItem (for example, a Cookie or URL parameter) Forms. How to show changing information when changing fields Forms. How to make a form with saved state Forms. How to work with a Slider type Forms. How to output and process data on a form from an external source via the API Forms. Adding a button to clear the form (Reset form) Forms. How to make a confirmation action in a text MESSAGE (SMS) form Setting the work schedule (weektime form field) Forms. How to make more than 1 action buttons in a form How to add examples of filling in fields in the form How to select a list value via the directory in the modal window How to make a confirmation window for the form action Forms. Dynamic change of the form's ItemId depending on other page elements Forms. How to add a new element if it is not in the list on the form. How to create a custom form with confirmation of action by Email or CMS How to make a delay when saving a form Hints-length limiters for fields in the form How to save the field value in the browser, so that you don't have to enter it every time you load it (leave the last saved one) Inserting links using a template (YouTube link, patternString) Forms. Uploading the form via the link Forms. Manage field settings via field options_ Forms. Using Google Recaptcha in forms How to specify custom mask for input field in form Form. How to display a tree with a selection of checkboxes Forms. How to choose a color in a form Custom verification of form fields via JS How to set available dates in datepicker Loading the form in the drop-down window Adding emojis to form fields Форма. Обработка даты из поля datetime-local Как у формы сделать progress bar при загрузке формы Редактор текста - код поля формы html2 Работа с датами в формах
- Working with SQL
- HOWTO JS
- HOWTO Layout
- Solve problems
Falcon Space Platform
This is a reduction in the cost of ownership
at the expense of fewer people to support
This is a quick change
while using the program
This is a modern interface
full adaptation for mobile devices
- Falcon Space Video
- Platform features demo will allow you to understand how this or that component looks and works
- Have a question? Write to the chat at the bottom right