CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Fill a field (if it is empty) with an URL variable?

Print topic Send  topic

Author Message
Jack_Walter

Posts: 39
Posted: 09/14/2008, 12:15 PM

Ok,

I'll try to clarify it a bit...

I have a page called 'tourEdit'. It holds the record form that was created with the grid & record builder (the search and display grid reside on the page 'tour'). Additionally I built a calender with the corresponding wizard. It is on the 'tourEdit_calendar' page. The label 'DayNumber' was converted to a link and it "exports" a variable (shown in the URL) back to the 'tourEdit' page.

Source type: Special Value
Parameter Source: Current Processing Date
Format: dd.mm.yyyy
Parameter name: tour_departure_date

Such an URL would look like this:

http://localhost/cruise_db/tourEdit.php?tour_departure_date=04.09.2008

On the 'tourEdit' page I have (among others) a date field (variable: {tour_departure_date}.

Control source type: Database Column
Control source: tour_departure_date

If I remove the tour_departure_date in the Control source I can fill this field with the url that I got back from the calendar link. But if I do that and open a tour that has a date in the database for that field it isn't used any more (ok, that's not really astonishing...).

What I'd like to achive:

The calendar exports an URL 'cal_departure_date' (this can easily be done with the expression above and should maybe not the same as the variable for the date field)

http://localhost/cruise_db/tourEdit.php?cal_departure_date=04.09.2008

The Control source on the tourEdit page for the date field stays the same and it gets it's date from the database but if there is no date in the db it should use the URL (cal_departure_date) to populate it. In most cases it would be used to fill empty date fields (and not change values that were stored in the db before).

The reasons I'd like to do this:

- The JS date picker can only show months, my calendar page shows a full year
- I have a few date fields on that page and typing them all in is a tedious work but 2 clicks with the mouse frees you from that
- With an URL I can always switch back to the calendar page and display the last date I used there | the JS date picker always shows the current date when the field is empty and you have to click quite a few times to get back to the last date you used

A screenshot how the calendar page looks like: http://www.bildercache.de/anzeige/20080914-211303-12.jpg

Regards,
Jack
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.