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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,078
Community Members
 
Community Events
176
Community Groups

Confiforms Formatting Phone Number

I would like users to enter a 10 digit number and later have it formatted
e.g 1234567890 into (123) 456-7890. I have tried using the formatPattern virtual function with the field definition rules macro and the IFTTT rules macro but it isn't changing the format.

Function: formatToPattern((\d{3})(\d{3})(\d+), ($1) $2-$3)

 

Thank you

1 answer

1 accepted

0 votes
Answer accepted

Hi @Daniel C_ Igbokwe 

Trying to understand what is the problem really...

See my test (based on what I understand) - http://recordit.co/gNMoAm8Iab

And the storage format for the reference, just in case

<ac:structured-macro ac:macro-id="5b58ef92-b997-4b40-8c3e-e9e817468c0f" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">myform</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="08688d3f-4ea6-4a6f-9bcf-b8ecd240b883" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<p>
<ac:structured-macro ac:macro-id="f5bb9cb4-7298-4d8e-bbca-c114c9880778" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
<ac:parameter ac:name="fieldLabel">t</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<ac:structured-macro ac:macro-id="09346186-c87d-4e3f-b85c-22560f0ade76" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">myform</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="73a1ff86-a50d-4e47-81a8-0c0186530df3" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="e423cf1f-6dd2-44fb-a769-c037375ad4cc" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">t.formatToPattern((\d{3})(\d{3})(\d+), ($1) $2-$3)</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Alex

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events