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.080 seconds

Hi guys Before I ask for help just like to say I tried the tutorials on how to make a 2.5 component WOW.... HECTIC!! J-Cook is really amazing in its simplicity!!
Dorac (Forum)  

Get Started