** Ignore this – I have asked a similar question a few months ago **
Alternatively – is there a way I can get the file field form within the Java file – currently using – field name ‘gas_elec_data’
// Set up data source
chart.dataSource.url = “https://weareinteb.co.uk/wp-content/uploads/data/gas-elec-monthly.csv”;
Hi John ….
Once again, many thanks for your response. Will have a play and try and teach myself.
However, had another idea and found an article you wrote in 2016 and have found a way around it for now. I have added the upload_prefilter to rename the file and also change the destination for the upload – therefore the csv filename and location will be constant.
Hi John ….
Thanks for your help.
chart.dataSource.url = “../wp-content/uploads/2021/05/sample_data_serial.csv”;
chart.dataSource.url = “<?php echo the_field(‘gas_data_file’, ‘option’); ?>”;
or if I have to something more fancy like I have seen in a few support posts already (sorry Java is not my forte…) like create a value from :
var datafile = <?php echo the_field(‘gas_data_file’, ‘option’); ?>;
and then add this in to the Java …. if so, it is here I am not sure how to write this last element.
I have looked at various articles but like that one, most are based upon having expected results in the rows to sort by.
My request seems fairly simple – I can easily sort posts based upon a date picker field in a non repeating field …. so why is it so difficult in a repeater – or better still where do I find the instructions.
I have been told by Support that the following should work … but I cannot get it to work.
‘post_type’ => ‘films’,
‘posts_per_page’ => 10,
‘meta_query’ => ‘film_captures_%_capture_date’,
‘orderby’ => ‘meta_value’,
‘order’ => ‘DESC’
Really am desperate to get this working before I have to ditch it and go another route so any thoughts or guidance would be gratefully received.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.