Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ConfiForms Rules for Field Definition set value for Textarea/Markdown field empty on form submit

Edited

I have been trying to set up a rule that will insert a default value for a textarea/markdown field in a form if a user leaves it empty. I am using the 'Set value if empty' Action and have tried many different combinations of field names (including blank) and conditions to check. What I keep running into is this.

If I leave Execute only on user action unchecked, the rule functions, but also populates the form with the default '{color:red}<insert Bleh Bleh Bleh>{color}.

I would like to keep the field empty on the form and only input the default on submit of the form so the default value will get inserted into the description.

If I check Execute only on user action, the rule doesn't appear to function. The field is empty, and nothing gets placed into the description when the form is submitted, unless I track another field and do something with it and then it gets placed into the field before the form is submitted.

Is there a way to track the submit/register button in the rule? Is there another way to accomplish this? I was going to look into replacing the register button with an action button or something

2 answers

1 accepted

Add the condition to this rule to check if the field is empty (to ensure it is executed only in appropriate case)

I have been using the empty condition, maybe some of my attempts and results will better clarify

------------------------------------

Field Name: eventdescription

Condition: eventdescription:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: eventdescription={color:red}<Insert Activity Description here>{color}

Result: Event description field has "{color:red}<Insert Activity Description here>{color}" prefilled in form (failure). Event description section in issue description has "<Insert Activity Description here>" in red text (success)

-----------------------------------

Field Name: eventdescription

Condition: eventdescription:[empty]

Execute only on user action: checked

Action to execute: Set Value if empty

Values to set: eventdescription={color:red}<Insert Activity Description here>{color}

Result: Event description field is blank in form (success). Event description section in issue description is blank (failure)

-----------------------------------

Field Name: (left blank)

Condition: [entry.eventdescription]:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: eventdescription={color:red}<Insert Activity Description here>{color}

Result: Event description field has "{color:red}<Insert Activity Description here>{color}" prefilled in form (failure). Event description section in issue description has "<Insert Activity Description here>" in red text (success)

-----------------------------------------

Field Name: (left blank)

Condition: [entry.eventdescription]:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: [entry.eventdescription]={color:red}<Insert Activity Description here>{color}

Result: Event description field is blank in form (success). Event description section in issue description is blank (failure)

-----------------------------------------

Field Name: (left blank)

Condition: eventdescription:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: [entry.eventdescription]={color:red}<Insert Activity Description here>{color}

Result: Event description field is blank in form (success). Event description section in issue description is blank (failure)

-----------------------------------------

I just want the entry field to be empty for the user, but if it is empty - to place a default message as a "reminder" for them to fill in the information later as it becomes available.   

Well, I would say ConfiForms behaves correctly for the rules you setup (first rule setup is correct, others are not), but...

What you want - cannot be done via the rule... Because you want to set the value for a field ONLY after you have submitted the form

This needs to be done with a ConfiForms IFTTT with "Create/Update ConfiForms Entry" action

And that shall have a condition

eventdescription:[empty]

and the parameters to set would be something like

entryId=[entry.id]&eventdescription={color:red}<Insert Activity Description here>{color}

That will work, thanks Alex. Learning more and more about these forms every day.

Thanks Alex - this helped me set the default for radio buttons.

Hi Alex,

 

I have tried this. Thanks, it works.

However, when I set the "Reference to form and its location" to be the exact same form on the same page, two separate data entries would be saved from only one form submission. In another word, a single click on the "Save" button would submit the form twice.

截屏2021-01-28 上午12.11.16.png

I just wish how can the IFTTT "Create/Update ConfiForms Entry" action Update data into the same data entry as the one submitted using the "Save" button?

(How can the record be one instead of two upon each form submission?)

 

Thanks,

Do you set 

entryId=[entry.id]

in your parameters for the "Create/Update ConfiForms Entry" IFTTT action?

See the description for this action and it tells you to set the ID parameter (as mentioned above) to perform an "update"

Alex

Like Yangyang Liu likes this

Oh, I have not actually.

 

I just tried adding this to the parameter and it works fine!

Thanks!

 

Yangyang

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,694 views 7 32
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you