Page 1 of 1

Save Button Show on Top in Related Table

PostPosted: Fri Feb 22, 2013 10:57 am
by muzafar
Dear All,


I have a related table in which I am using fieldgroup__template (http://xataface.com/wiki/fieldgroup_template) to show the form fields in the group. This work fine, but the problem is that In form, the Save Button, is showing at the top of the form, as you see in the screenshot, Can Anyone please guide me, that what should I do for the button to show it at the End of the Form. The button is showing fine, means at the End of the form, when I access the table directly from a URL, i.e. ?-table=tableName.

index.png
index.png (30.88 KiB) Viewed 8499 times


looking forward for earlier response. your help will be greatly appreciated.

Thanks,

Re: Save Button Show on Top in Related Table

PostPosted: Fri Feb 22, 2013 11:22 am
by shannah
Is that the only "Save" button on the form, or is there another one at the bottom? Can you post the relevant fields.ini & relationships.ini files?

Re: Save Button Show on Top in Related Table

PostPosted: Fri Feb 22, 2013 12:01 pm
by muzafar
Yes, It is the only Save button on the form which is showing at the top , No other button at the bottom.


legalDocumentation.html
<table width="100%">
<tr>

<th align="left">Upload:</th>
<td>{$elements.legalUpload.html}</td>

<th>Comments:</th>
<td>{$elements.legalComment.html}</td>
</tr>

</table>



fields.ini
[fieldgroup:legalDocumentation]
label="Registration/Legal Documentation"
template="Assessments/legalDocumentation.html"
order = 1

[legalUpload]
group=legalDocumentation
widget:label = "Legal Upload"
widget:type = file
Type=container
savepath=tables/files
;allowed_extensions = pdf,doc,docx,rtf,xlsx,xls
visibility:list=hidden
visibility:find=hidden
secure=1

[legalComment]
group=legalDocumentation
widget:label = "Legal Comments"

relationships.ini
[Assessments]
Assessments.applicationId = "$id"
action:label = assest
action:order = 5
action:visible = 1

Re: Save Button Show on Top in Related Table

PostPosted: Fri Feb 22, 2013 12:11 pm
by shannah
Hmm... Looks like it may be a bug. It is rendering the "Default" field group at the top, but there are no fields in it... it should render save buttons at the end of each group.... I'll have to look into this.

A quick fix would be to change the order of your field group to -1 (instead of 1).
e.g.
Code: Select all
[fieldgroup:legalDocumentation]
label="Registration/Legal Documentation"
template="Assessments/legalDocumentation.html"
order = -1


Steve

Re: Save Button Show on Top in Related Table

PostPosted: Fri Feb 22, 2013 12:26 pm
by muzafar
Dear Shannah,

I Just sent you only first fieldgroup data, Actually I have about 20 fieldgroups and feilds, What should I do now, to show the "Save" button at the END, means after the SAVE button should show after the 20 fields.

for instance:
[fieldgroup:legalDocumentation]
label="Registration/Legal Documentation"
template="Assessments/legalDocumentation.html"
order = 1

[fieldgroup:charterOfOrganization]
label="Charter Of Organization"
template="Assessments/charterOfOrganization.html"
order = 2

[fieldgroup:organogramOfOrganization]
label="Organogram Of Organization"
template="Assessments/organogramOfOrganization.html"
order = 3

Re: Save Button Show on Top in Related Table

PostPosted: Tue Feb 26, 2013 9:51 am
by shannah
It looks like the "save" button is showing up in the default group and it has an "order" of 0. So you can either change the order of the other groups to show up earlier, or you can set the default group to show up at the end.

Code: Select all
[fieldgroup:__global__]
  order = 99