Forums

Auto populate field

maxslo 08 Apr, 2015
Hi
Is there a way to do this:
I create a link in article, say "order".
When visitor click on that link, goes to form page. In that form must be field with allready populated value article title.
If its possible to open that form in jquery slimbox is bonus.
GreyHead 10 Apr, 2015
Hi maxslo,

If you are using a link in an article the simplest solution is to add the article title (or its ID) to the URL.

I don't know the slimbox syntax but is you add the modal code to the link and add &tmpl=component to the URL then the form should open in the modal window.

Bob
maxslo 10 Apr, 2015
Can you give me an example of link and how to make field for that in the form.
Max_admin 11 Apr, 2015
form link (copied from the view form in the forms manager) + "&field_name=value"

e.g:
index.php?option=com_chronoforms5&chronoform=demo-autocompleter&field_name=value


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
maxslo 13 Apr, 2015
Thanks, that worked. So simple.
Is posible with SEF url?
For example domain.com/formname/....
Max_admin 13 Apr, 2015
If you have SEF enabled then it should convert it automatically I think, but if it doesn't then you can use SEF url and append the parameter.
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 13 Apr, 2015
Hi maxslo,

It may work with an SEF URL but how is that useful - the link URL isn't visible until after it is clicked, then it may automatically be converted to an SEF URL.

Bob
maxslo 13 Apr, 2015
I miss one part of url.
Must be domain.com/sefalias/Formname&field_name=value

Thank you. Case solved.
maxslo 13 Apr, 2015
Said to soon.
With sef url is not working.
Field value is not populated with sef url.
Max_admin 13 Apr, 2015
Please try to use "?" instead of "&" before the parameter name if its the only passed parameter in the URL
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
maxslo 13 Apr, 2015
That worked. ? is the way for sef url.

Thank you Max.
GreyHead 13 Apr, 2015
Hi Maxslo,

The query string part of a URL always starts with a ? so it looks like ?var_a=value&var_2=another_value& . . .

Why do you need an SEF URL for a link like this?

Bob
maxslo 13 Apr, 2015
Bob, because it looks beter and more profesional.

BTW, you guys offer best support I ever seen for open source scripts. Thumbs up.
This topic is locked and no more replies can be posted.