Text Box Default Value from Another Field (Drop-down,Checkbox,etc)

Jacob Reyes asked on June 6, 2018 22:46

Greetings,

I have questions about the form text box.

Can a BizForm text box be set up to get/receive a default value from another field with macro expressions?

Example would be -

  1. Radio Button: Value Option 1; Value Option 2; Value Option 3.
  2. Users Selects Option 3, and Option 3 inputs value to depending Text Box.

Do you need to switch the text box Form Control to something else? If so will that record to the DB on submission?

Any advice would be much appreciated.

Recent Answers


Brenden Kehren answered on June 7, 2018 15:07

I do not believe you can set the default value based on another fields value on submit. Reason being is the lifecycle of the form; the macro is processed too late and the form data will already have been inserted/updated. You will need to create a custom global event handler for the form to update/change this information.

https://docs.kentico.com/k11/custom-development/handling-global-events/reference-global-system-events#Reference-Globalsystemevents-BizFormItemEvents

0 votesVote for this answer Mark as a Correct answer

Jacob Reyes answered on June 7, 2018 15:55

Hi Brenden Kehren, I see, that makes sense. I'll read through the documentation you linked to. Thanks for the help.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.