Is this possible? Begging for some type of assistance!
August 1, 2008 6:04 PM   Subscribe

Joomla 1.5 form puzzle. Looking for a way (either a plug-in or module) to let me create a custom form that will allow users to input a code and based on the day the code is inputted, assign a numeric value...

Ok, so I have a bit of a conundrum, I have a site, built with Joomla 1.5 and I want to make a page where users can input receipt numbers for various things. Say you received a receipt from a store, and what we want to try and accomplish (as none of us are really certain if this is doable) is the customer would input this receipt, and based on the day the receipt is inputted, there would be a set assigned variable...

For instance, say the users receipt number is 77804 and he put this number into the form on a Monday. If you put a receipt in on a Monday, the receipt value would be 3, if it were a Friday it would be a 7...etc etc....

Is this possible using Joomla and if so, how can we accomplish this? I know there are dozens of form plugins for Joomla, we just don't know what ones would work the best and which ones can actually do this.

Finally, after the user inputs the receipts, we as the "end users" would get an email or something accessible where only the admins can see the results of the receipt totals.

Looking for any info on this as its something we have been trying to figure out for almost 2 months now and we are just not getting any where. Please, MiFi super geeks, nerds, Joomla advocates and designers, we are begging to find a way to make this work. We might even be able to give some type of trade or something for any help with this question....do I sound desperate enough!?
posted by TeachTheDead to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
Does Joomla allow embedded PHP?
posted by sonic meat machine at 7:16 PM on August 1, 2008


I take it that you guys aren't python programmers yourselves? I'd recommend trying to get hold of one.. looking here might be a good place to start, or even here

Of course, there's probably 150 itchy-fingered MeFites with mad python skills and solutions already written... ;)

Hopefully you'll find someone who knows Python and Joomla well enough to be able to sort you out.
posted by cheaily at 7:48 PM on August 1, 2008


Response by poster: ok, good start....thanks so far, I take it there is no plugin already made for sale or some thing?

I believe it does all embedded PHP, as Joomla is written in PHP i believe...
posted by TeachTheDead at 8:09 PM on August 1, 2008


I've only used Joomla 1.0 and not 1.5 so I'm not sure if there have been any improvements that would affect my suggestions.

If your form is quite simple then I would use regular content page with some PHP embedded to populate a hidden field for the day of the week variable. I used Jumi previously and it worked well and seems to have a 1.5 native version.

You could have this form post to a separate PHP file that mails the results as needed. The function in Joomla 1.0 to send mail was mosMail.

If the form is quite long and needs a lot of other validation/functionality then perhaps someone can suggest a form component to use. Otherwise I think it would just be overkill.

Regarding the code needed to generate the day of the week, the PHP date function can output a number based on the day of the week. The standard options are to either use "0 (for Sunday) through 6 (for Saturday)" or "1 (for Monday) through 7 (for Sunday)" but this can easily be adjusted as needed.

cheaily - I am not sure where the Python suggestions come from as Joomla is written in PHP.
posted by Gomez_in_the_South at 12:11 AM on August 2, 2008


Response by poster: Thanks so far again guys....been waiting all week to answer this....
posted by TeachTheDead at 6:03 AM on August 2, 2008


Specifically, the code you need is as follows:
$day_number = date("w",mktime());

This will make $day_number equal to a number zero through six, beginning at Sunday, and you can output it where you need it. If you need the numbers to begin on Saturday, use a switch statement.
posted by sonic meat machine at 9:47 AM on August 2, 2008


While I can't monkey together the code to make it happen, the addon FacileForms has a unique scripting function that, I'm sure, could be made to do what you're asking for.

I make mine do all kinds of maths for a donation form, although yours is much more complicated. The facileforms forum is pretty well attended, someone there might be able to help you---alternatively you could farm it out to someone at rentacoder and get it done for, meh, $15 or so.
posted by TomMelee at 7:42 PM on August 2, 2008


« Older Buy an airplane slide?   |   Do Mulder and Scully count? Newer »
This thread is closed to new comments.