Syntax textfield

How to reference a form textfield with square brackets in its name in ChronoForms.

Overview

The issue occurs when trying to access a form field named with square brackets, like `Article[pasnr]`, using incorrect syntax in CF actions.
Use the correct syntax `{data:Article.pasnr}` in your action, and verify the field is in the submitted form area using a debug action to check available data.

Answered
Connectivity v6
Jo JoCo 06 Mar, 2020
Dear volunteers,

I want to check the content of a form textfield before i save that content in a database table.
It is build in Views with Form area / Fields and the name of that textfield is Article[pasnr] (with block brackets) because i want to write it back in the database.
I tried several options like {data:Article[pasnr]} or {data:Article.pasnr} but nothing works.
Can you tell me what is the syntax of that field when i want to use it for instance in a Read Data?
he healyhatman 07 Mar, 2020
Answer
{data:Article.pasnr} is correct, as long as there aren't multiple of it. Make sure that textfield is actually in the form area you're submitting though. Use a {debug:} in your event to check what data you have available
Jo JoCo 08 Mar, 2020
Thank you very much healyhatman.
It works.😀😀

Kind regards, JoCo
This topic is locked and no more replies can be posted.