-
Posts
80 -
Joined
-
Last visited
About sunziun
- Birthday 07/08/1982
Previous Fields
-
Languages
PHP, MySQL, JavaScript, HTML, XHTML, CSS
Contact Methods
-
Website URL
http://www.omarservice.co.uk
-
Skype
omarservice-uk
Profile Information
-
Location
London, UK
-
Interests
Graphic Design, Website design, CMS/E-commerce
sunziun's Achievements
Newbie (1/7)
1
Reputation
-
Hi thescientist, $gdate is a custom field from Advanced Custom Fields Plugin. It's date field which should display Gregorian date like 15/03/2014. $currentdate should grab the date of example 25/04/2014. And what I want is: If $gdate is equal to $currentdate then display "Today". Otherwise display the standard data from the loop. This is somehow not working properly or it displays just the normal loop. I have even tried to use $currentdate->setDate(2014,04,25) for testing purpose.
- 5 replies
-
- wordpress
- advanced custom fields
-
(and 2 more)
Tagged with:
-
Hi Justsomeguy, thanks for your reply. Actually nothing happens or it displays just the future posts. I might be missing some bits but I don't know what. Maybe it help you to understand more if access the website at hijamadays.com
- 5 replies
-
- wordpress
- advanced custom fields
-
(and 2 more)
Tagged with:
-
I have a list of 'post_status'' => 'future' which are published at certain dates throughout the year. These posts are custom posts whith Advanced Custom Fields. Since a couple of days I'm trying to display "Today" of published posts (for that particular day). The word "Today" should only display if date of the post equals the current date otherwise the the scheduled posts should be displayed. The query which looks like this display future posts: $future= new WP_Query(array( 'post_type' => 'hijama_days', 'date' => date('d/m/Y'), 'posts_per_page' => 1, 'order' => 'ASC', 'post_status' => 'future',)); The loop looks like this: while ( $future->have_posts() ) : $future->the_post();// next line is from Advanced Custom Field Docs$gdate = DateTime::createFromFormat('Ymd', get_field('gregorian_date')); I've tried this to display "Today" when the current event has been pusblished for that day: $currentdate = new DateTime();<p>When is the next event date?</p><?php if( $gdate->format('d/m/Y') == $currentdate->format('d/m/Y') ){ ?> <h1>Today</h1><?php } else { ?> <h1><?php echo $gdate->format('l') . ' '; the_title(); ?></h1><?php } ?> <h4>Gregorian: <?php echo $gdate->format('d/m/Y'); ?></h4> Somehow I cannot figure why is not working for me. Please help me out here.
- 5 replies
-
- wordpress
- advanced custom fields
-
(and 2 more)
Tagged with:
-
Hopefully someone can help me solve with this "easy" problem! I'm looking for a way to populate data in a Contact Form 7 (WordPress) from session. The session will be started by clicking on a book now button like this: <?php session_start(); if(isset($_GET['bookingdate'])) { $_SESSION['started'] = true;}?><a href="?bookingdate"> Book now </a> After clicking the button and the session is started I want to redirect to the form "booking " page and populate one of the fields with the booking date. The visitor will fill the rest of the form and submits. After submission the session will be destroyed. Would that be possible when using Contact Form 7 and WordPress?
-
- wordpress
- contact form 7
-
(and 2 more)
Tagged with:
-
another option would be <button href="http://yourwebsite.com">Your Button Name</button> BTW this is HTML5 button tag!
-
Hi, you could try this plugin for your gallery, compatible with all browsers :)And its free!
-
Hi, you could check on grids like 960 Grids then click on "Custom CSS Generator". With a grid you can create table like divs!
-
[ SOLVED ] Hi everyone, thanks for your hints and supports. I got it working by just adding an onChange tag to the input field. <label>Destination House Number & Postcode</label><input type="text" id="postCode" name="postCode" onChange="EasyGo()" value="" required /> Javascript now listens to the events and I can capture all user inputs.
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with:
-
So, what do you suggest?
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with:
-
This is the live code now and its still not working, which means I'm not getting the value entered by the user: <label>Destination House Number & Postcode</label><input type="text" id="postCode" name="postCode" value="" required />// Destination postcodevar pcode = document.getElementById('postCode').value// PayPal Item Namedocument.getElementById('item').value = "Dest: " + pcode + ", Week: " + week + ", Load: " + loading + ", Add. Hours: " + chours
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with:
-
Hi, if I set the input field like this: <input type="text" id="postCode" placeholder="example: 25-NW23ED" value="Test postCode" required /> then I get the required results. But this is only if I preset the value. I don't to preset the value. I need the user to enter the postcode in this field and javascript should catch the entered values. This var pcode = document.getElementById('postCode').value catches only preset values. Many thanks for any suggestions!
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with:
-
Hi, here is the live link: http://easygoremovals.co.uk/book_now/
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with:
-
Hi, thanks Deirdre's Dad. This typos occurred just now while I was writing this post (already amended).So I think there is something else wrong.
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with:
-
Hi, I got a form which I use to take payments via PayPal. All is setup but one form field. To write the "item_name" for PayPal i use this piece of code: document.getElementById('item').value = "Week: " + week + ", Load: " + loading + ", Add. Hours: " + chours + ", Dest: " + postcode Selection fields are: week, loading and chours postcode is an input field, type text I want to get the postcode entered by the user into the item field and use it as the item_name for PayPal. I tried pcode = document.getElementById('postcode') postcode =pcode.value postcode = document.FormName.ElementName.value and more other suggestions form the internet, but none is working.postcode is always empty or undefined form field is: <input type="text" id="postcode" name="postcode" required /> Please someone help me out!
- 15 replies
-
- form
- user input
-
(and 3 more)
Tagged with: