Hi Johan,
yes, it is possible. And you were actually very close :-)
In order to pass preset-parameters within a URL, you just need to prefix the fieldname with a "p". In your example, you would write "...&pSubsystems=Vacuum".
Here is an example for the Linux Demo logbook:
https://midas.psi.ch/elogs/Linux+Demo/?cmd=New&pAuthor=Santa+Claus&pSubject=Christmas+Presents&pType=Problem+Fixed&pCategory=Hardware
This feature is even already documented: https://midas.psi.ch/elog/userguide.html#misc :-)
I wish you a Happy New Year!
Andreas
Johan Forsberg wrote: |
Hi all,
I have a use case for ELOG where I need to be able to "prefill" some attributes in the "cmd=new" form, based on the URL.
To illustrate, imagine a link that takes the user directly to the form for creating a new post, with the "Subsystem" attribute already filled out to "Vacuum".
Is this possible already? I've tried naively using URL parameters (e.g. "&Subsystem=Vacuum") but that does not work. If it's not implemented, I think it would be a useful feature to have (and quite important for my particular use case). I could create a new post first using the "elog" tool, with the desired attributes set, but it makes more sense to defer the actual creation of the post to the user, i.e. he/she might change their mind before pressing "submit".
Thanks,
Johan Forsberg, MAX IV Laboratory, Sweden
|
|