How to Add Button under a Section in a Form View

ibilge
Tera Contributor

Hi everyone 🙂

 

I am trying to add a button under a section in form view. But wenn i add a UI-action i see it not under the section.

Could u please help me how to add a button in section? i am adding a screen shot, which shows what i now have

 

Thanks!

ibilge_0-1712724343958.png

 

1 ACCEPTED SOLUTION

Deborah Brown L
Kilo Sage

Hi @ibilge , 

we cannot create a UI action inside the form. But can create a button using UI macro.

Please find the step below,

1. Create a UI macro with the below script

<button id = 'click' onclick="onbutton();">click</button>
<script>
function onbutton(){
    g_form.setValue('description', 'done');
    g_form.save();
   
}
DeborahBrownL_0-1712727239577.png

2. Create a UI Formatter and in the formatter field write ui macro name with .xml in the end.

DeborahBrownL_1-1712727292395.png

 

3. Go to form Layout and select the formatter name in the list and place it where you needed and save.

DeborahBrownL_2-1712727376586.png

 

4. Now you can see the button in the form. you can modify the button however you want.

DeborahBrownL_3-1712727414598.png

 

Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me.

Regards,
Deborah Brown

View solution in original post

3 REPLIES 3

Deborah Brown L
Kilo Sage

Hi @ibilge , 

we cannot create a UI action inside the form. But can create a button using UI macro.

Please find the step below,

1. Create a UI macro with the below script

<button id = 'click' onclick="onbutton();">click</button>
<script>
function onbutton(){
    g_form.setValue('description', 'done');
    g_form.save();
   
}
DeborahBrownL_0-1712727239577.png

2. Create a UI Formatter and in the formatter field write ui macro name with .xml in the end.

DeborahBrownL_1-1712727292395.png

 

3. Go to form Layout and select the formatter name in the list and place it where you needed and save.

DeborahBrownL_2-1712727376586.png

 

4. Now you can see the button in the form. you can modify the button however you want.

DeborahBrownL_3-1712727414598.png

 

Note: Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me.

Regards,
Deborah Brown

hi @Deborah Brown L 

Thanks a lot!

SandaminiM
Tera Contributor

Hi @ibilge and @Deborah Brown L 😀,

Can you guys please tell me whether the following thing is possible? I want to add custom buttons 'Accept' or 'Reject' with actions related to them in the Workspace.

Can you guys help me 😢 ?
button.png