Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • Kevin
  • Kevin's Avatar Topic Author
  • Visitor
  • Visitor
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.

Please Log in or Create an account to join the conversation.

Last edit: by Kevin.

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

  • Kevin
  • Kevin's Avatar Topic Author
  • Visitor
  • Visitor
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?

Please Log in or Create an account to join the conversation.

Last edit: by Kevin.

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

On my project I added this manually
<button onclick="javascript:Joomla.submitbutton('save')">
	Save &amp; Close
</button>

and it worked for me...
Paulo Griiettner

Please Log in or Create an account to join the conversation.

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

  • Kevin
  • Kevin's Avatar Topic Author
  • Visitor
  • Visitor
Thanks griiettner but,

where do I add this to?

Please Log in or Create an account to join the conversation.

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

  • Kevin
  • Kevin's Avatar Topic Author
  • Visitor
  • Visitor
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.

Please Log in or Create an account to join the conversation.

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

I think now you have to set the permissions on Joomla 1.7 ACL... allowing guest users to submit the form
Paulo Griiettner

Please Log in or Create an account to join the conversation.

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

  • Kevin
  • Kevin's Avatar Topic Author
  • Visitor
  • Visitor

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.

Please Log in or Create an account to join the conversation.

Last edit: by Kevin.

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

  • Kevin
  • Kevin's Avatar Topic Author
  • Visitor
  • Visitor
:( 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 !!!

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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
The following user(s) said Thank You: amala

Please Log in or Create an account to join the conversation.

Last edit: by admin.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
If you set the permission to create, it works also, but is more permissive.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Solved since 1.4.2
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.117 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started