default location

Hello all @dkayiwa , How can code openmrs to select default location. Should I write it like this: Default= “location.id:2” Obviously that didn’t work

Thanks for you help

Is that in an xform?

nop @dkayiwa
reference app : login page

By the way, when you say “should i do this or that”? Have you actually tried out these options and seen what happens? :slight_smile:

I have not noticed any changes. the login page is the same

Can i look at your changes on somewhere like github?

Hello @dkayiwa, I am trying to find the source code for reference app 2.3 and 2.4 but I could not. Where are these kept? I need them so I can show you the changes

I mean the changes that you have made locally.

@dkayiwa This is the changes on the reference application login file. I added default=“location.name:pharmacy” it didn’t work. Not sure how to write it correctley

http://pastebin.com/LGcRv8vZ

The original full code can be found here https://github.com/openmrs/openmrs-module-referenceapplication/blob/master/omod/src/main/webapp/pages/login.gsp

Anybody can help me in this regards … I appreciate your support

@yadamz the reference application automatically selects a location basing on what one had selected for the last login session. If that is not enough for you, you can put your default location as the lastSessionLocation

The links below will help you see what is going on: