Save Button Show on Top in Related Table

A place for users and developers of the Xataface to discuss and receive support.

Save Button Show on Top in Related Table

Postby muzafar » Fri Feb 22, 2013 10:57 am

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 5612 times


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

Thanks,
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: Save Button Show on Top in Related Table

Postby shannah » Fri Feb 22, 2013 11:22 am

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?
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Save Button Show on Top in Related Table

Postby muzafar » Fri Feb 22, 2013 12:01 pm

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
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: Save Button Show on Top in Related Table

Postby shannah » Fri Feb 22, 2013 12:11 pm

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
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Save Button Show on Top in Related Table

Postby muzafar » Fri Feb 22, 2013 12:26 pm

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
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: Save Button Show on Top in Related Table

Postby shannah » Tue Feb 26, 2013 9:51 am

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
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved