if-clause within
-
Hi Jordy,
is it possible to have if-else within an AI submit form.
Like in the prompt: “Answer my question <if ({NAME} !=””) “You are {NAME}”>
while {NAME} is a AI Form Field.
If the user leaves the AI form field “NAME” empty the AI submit form would use “Answer my question” as the promt
If the user enters “Peter”, the AI submit form would use “Answer my question. You are Peter”
In the end, I would like to use AI form fields which are not mandatory to be filled out. If they are filled out, they should be integrated with some context in the AI Form Submit promt.
Is there a way to do that with PHP or Javascript within the AI Form Submit code-block?
Thanks a lot
The topic ‘if-clause within’ is closed to new replies.