Welcome, Guest
Username: Password: Remember me

TOPIC: [CLOSED] Save button for public on frontend ?

[CLOSED] Save button for public on frontend ? 24 Oct 2011 21:46 #332

  • Kevin
  • Kevin's Avatar
I have a form for a local fishing competition and would like the public to be able to fill it in without the need to register.

How do I get the save button to show for public users in joomla 1.7.

I can only see options to set access levels to the link in my main menu,
but this just sets if the link shows or not.
Last Edit: 24 Oct 2011 21:58 by Kevin.
The administrator has disabled public write access.

Re: Save button for public on frontend ? 24 Oct 2011 22:20 #333

  • Kevin
  • Kevin's Avatar
Seems the permissions can be set to an article, but I cannot see a way to set to permissions to a layout from my component because I only have settings for the menu link.

Is this something that needs to be added to the code?
Last Edit: 24 Oct 2011 22:22 by Kevin.
The administrator has disabled public write access.

Re: Save button for public on frontend ? 24 Oct 2011 22:52 #334

  • griiettner
  • griiettner's Avatar
  • Offline
  • Senior Member
  • Posts: 73
  • Thank you received: 12
  • Karma: 8
On my project I added this manually
<button onclick="javascript:Joomla.submitbutton('save')">
	Save &amp; Close
</button>

and it worked for me...
Paulo Griiettner
The administrator has disabled public write access.

Re: Save button for public on frontend ? 25 Oct 2011 18:11 #343

  • Kevin
  • Kevin's Avatar
Thanks griiettner but,

where do I add this to?
The administrator has disabled public write access.

Re: Save button for public on frontend ? 25 Oct 2011 18:19 #344

  • Kevin
  • Kevin's Avatar
OK Got it thanks griiettner, I was trying to add it to the list instead of the item by mistake.

Button is there but I still have the issue.

"You don't have the rights to Save" appears.

I am trying to allow public users to save their record without registering.
The administrator has disabled public write access.

Re: Save button for public on frontend ? 25 Oct 2011 18:45 #345

  • griiettner
  • griiettner's Avatar
  • Offline
  • Senior Member
  • Posts: 73
  • Thank you received: 12
  • Karma: 8
I think now you have to set the permissions on Joomla 1.7 ACL... allowing guest users to submit the form
Paulo Griiettner
The administrator has disabled public write access.

Re: Save button for public on frontend ? 25 Oct 2011 19:17 #346

  • Kevin
  • Kevin's Avatar
griiettner wrote:
I think now you have to set the permissions on Joomla 1.7 ACL... allowing guest users to submit the form

Thanks again.....

Joomla 1.7 ->Global Configuration->Permissions

Set Public [create] to [Allowed]

I had seen this but was looking for a way to set permissions elsewhere.
Last Edit: 25 Oct 2011 19:18 by Kevin.
The administrator has disabled public write access.

Re: Save button for public on frontend ? 25 Oct 2011 19:26 #347

  • Kevin
  • Kevin's Avatar
:( NO :(

Just realised that the save button appears but still getting the message

"You don't have the rights to Save"

There must be a way to do this !!!
The administrator has disabled public write access.

Re: Save button for public on frontend ? 26 Oct 2011 15:19 #353

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
There is a little bug here.

In your controller, function save()

Replace
if (!$this->can('core.edit', JText::_("JTOOLBAR_SAVE")))
	return;

// Check for request forgeries
JRequest::checkToken() or jexit( 'Invalid Token' );

$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
$post	= JRequest::get('post');
$post['id'] = (int) $cid[0];


By
// Check for request forgeries
JRequest::checkToken() or jexit( 'Invalid Token' );

$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );
$post	= JRequest::get('post');
$post['id'] = (int) $cid[0];



if ((((int)$cid[0] > 0) && !$this->can('core.edit', JText::_("JTOOLBAR_SAVE")))
	|| (((int)$cid[0] == 0) && !$this->can('core.create', JText::_("JTOOLBAR_SAVE"))) )
	return;


Corrected for next version
Coding is now a piece of cake
Last Edit: 26 Oct 2011 15:20 by admin.
The administrator has disabled public write access.
The following user(s) said Thank You: amala

Re: Save button for public on frontend ? 26 Oct 2011 15:27 #354

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
If you set the permission to create, it works also, but is more permissive.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Save button for public on frontend ? 27 Oct 2011 12:29 #357

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Solved since 1.4.2
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.071 seconds

Get Started