Date From and Date To elements inline?

JackGoa

Member
Hi, I've got a form where a user should select a date they want to arrive and one for departure. It's in a very short simple form so I only have 1 column for the form, however, it would be awesome to get the two date fields to sit next to each other.
I cannot figure out how to get this done?
I tried putting them in a group with 2 columns, but they won't line up. Another problem with putting them in a group is that the don't display between the elements I want them displayed in.
 
Hi Jaanus. Thanks for that. It does seem like creating groups for this form would be the only way to go. It is such a short form though, that I never bothered with groups.

One little Issue I have with this is, I have had to duplicate this form for each page I want it displayed on. The reason for the duplication instead of just publishing the same form on each page is, I need to know on which page the form was submitted. Is there any way of grabbing a page's title in a hidden field so that it can be used in the emails following submission of the form?
 
Try creating a simple field element, hidden, add a JavaScript event to it, for 'load', which does ...

Code:
this.value = document.title;

--hugh
 
yes yes yes, thank you thank you thank you!
just one little tweak, i see it grabs the <title> of the page, what would the javascript be to grab the article title/subject, instead?
is there a list of these things somewhere perhaps, in case i want to grab other info from a page?

you're saving me such a headache hugh! i've been duplicating forms like a crazy person where i could have just been using one form all over the place.

i know i'm going off topic here now. i've aked before, but did not get a reply. any chance you could point out to me where i find the info in the wiki about joining users to additional profile information after they have logged in? for instance to, update their profile, or anything related to logged in users. that particular video in the tutorial seems to be broken.
 
There's no easy answer to that, as it depends entirely on what you are trying to fetch from the DOM, what template you are using, etc. The <title> is easy, because that's predefined in the HTML page spec, every page is going to have a document.title. But if you are trying to get at (say) the title of a J! article ... that's going to be totally dependent on your template.

So the only way to do it is to learn a few basics about JavaScript selectors, and learn to use a the developer tools in your browser of choice. So here's a quick video of using the "inspector" and the console in Chrome's dev tools, to identfy where the title of a J! article is in the standard Protostar template, and using J! selectors to navigate to it.

http://screencast.com/t/sWYQq94dB

Once you have successfully managed to get the text you need with whatever selector works (and there's always going to be different ways of doing it, I just did it the most straight forward and "standard" javascript way, without using jQuery, etc) in the console, just copy and paste it to your element action in Fabrik.

Re the profile stuff, have you searched the forum? That's stuff we've given out answers to a lot over the years. The basic answer is just use the juser form plugin, and specify the 'user' element on your profile form that holds the userid.

-- hugh
 
Ah ok, I understand. I'll go through that video and do some more homework. Thanks for that.

RE the profile thing. I have searched the forums, but I might be using the wrong search terms. I know I have seen this stuff before. I am already using juser. I have users signing up for events. They create their profiles while signing up and automatically become Joomla Users too. I now want to have them be able to login and from there, check/update their profiles, enter events without having to submit all their profile info again, etc.
I'm just not sure how to go about creating those links and joining it all together. If I remember correctly, it is done through the URL somehow? Or, when they open a form, I have a hidden field grabbing the userid to connect the dots in the db once they submit?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top