CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What is this "reset=1" parameter?
Pages: [1]

Author Topic: What is this "reset=1" parameter?  (Read 1837 times)

hlevinson

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 3
What is this "reset=1" parameter?
June 19, 2009, 08:51:33 am
What is this "reset=1" parameter?

Is this default set by

PHP
Drupal
CiviCRM
or what?

I poked around in the various Admin pages but I don't see how this default is set.

Also, what does this do (compared to omitting the parameter)?

Can you send me some links with documentation about "reset"?

thanks
Harry Levinson


Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: What is this "reset=1" parameter?
June 19, 2009, 12:53:30 pm

hmm, not sure i understand the question. civicrm uses that parameter to start off with a clean slate for most urls

you can read more about the architecture/ideas behind it at: http://civicrm.org/architecture/

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

hlevinson

  • I post occasionally
  • **
  • Posts: 53
  • Karma: 3
Re: What is this "reset=1" parameter?
June 19, 2009, 02:00:54 pm
I gathered that it performs some kind of cleaning or reset, but ...

I was trying to figure out

1. Who "owns" or uses this parameter -- CiviCRM or some other software (Drupal). So you answered that question  ;)
2. What happens without "reset=1"? Are there other useful values besides [1]?
3. It seems whenever I click anything in CiviCRM it always has "reset=1". If that's true, why isn't that functionality just hardwired? (Maybe I just haven't noticed cases where that was missing.)

I looked at the architecture page but didn't see any docs about what kind of resets are happening with this parameter. Maybe you could send me a more specific link?

thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: What is this "reset=1" parameter?
June 19, 2009, 09:19:17 pm

2. its a binary value, so 0/1 are the valid values

3. When you hit submit / on a multi-page form / when u need to go back to a search, we return back to the same url without a reset=1

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ccowens

  • Guest
Re: What is this "reset=1" parameter?
July 07, 2009, 04:16:39 pm
Quote from: Donald Lobo on June 19, 2009, 09:19:17 pm

2. its a binary value, so 0/1 are the valid values

3. When you hit submit / on a multi-page form / when u need to go back to a search, we return back to the same url without a reset=1

lobo


Tantalizing hint, but I don't understand what you mean.  I've been all over the code and I haven't figured out who's picking up the &reset argument or what it does.  Similarly, what does &force do?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: What is this "reset=1" parameter?
July 07, 2009, 04:56:10 pm
My understanding is that reset=1 clears the locally scoped session values (generally for a specific form). And force=1 "forces" a search form to retrieve search results using the search parameters currently in it's session.
Protect your investment in CiviCRM by  becoming a Member!

ccowens

  • Guest
Re: What is this "reset=1" parameter?
July 07, 2009, 05:38:18 pm
Quote from: Dave Greenberg on July 07, 2009, 04:56:10 pm
My understanding is that reset=1 clears the locally scoped session values (generally for a specific form). And force=1 "forces" a search form to retrieve search results using the search parameters currently in it's session.

So does force=1 pretty much mean, "skip displaying the input form to the user, just execute the search with default values, as though the user had just clicked on the "search" button without entering or changing any fields?"

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: What is this "reset=1" parameter?
July 07, 2009, 06:13:37 pm
close. it means perform the search based on what is there in the session

if you send both reset=1&force=1 it basically means do the search with default values and display the results

in profile searches, you can also pass search=0 which hides the search input form - this is mostly used for static directories and drill-downs - since you can pass search criteria in a URL - see bottom part of this wiki doc page : http://wiki.civicrm.org/confluence/display/CRMDOC/Linking+Profiles

lobo
« Last Edit: July 08, 2009, 10:05:00 am by Dave Greenberg »
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • What is this "reset=1" parameter?

This forum was archived on 2017-11-26.