konsument
Forum Replies Created
-
Hey,
I need exact the same dropdown solution. Unfortuantely if there are posts with the same title it only display one of that title. In my example I got a lot of “Lorem Ipsum”-titles where only one shows up. Whats wrong there?
function cf7_dynamic_select_jobs($jobs, $args=array()) { $args = array( 'post_type' => 'jobs', 'orderby' => 'date', 'order' => 'DESC', 'posts_per_page' => -1 ); $query = new WP_Query($args); $jobs = array(); if ($query->have_posts()) { global $post; while ($query->have_posts()) { $query->the_post(); $jobs[get_the_title()] = get_the_title(); } wp_reset_postdata(); } return $jobs; } add_filter('show_jobs', 'cf7_dynamic_select_jobs', 10, 2);
Forum: Plugins
In reply to: [WordPress Infinite Scroll - Ajax Load More] Display Category NameWorks! Great. Thanks!
Forum: Plugins
In reply to: [Calculated Fields Form] Additional data-attributes to option elementsI want to populate option values based on url params as Ive descibed here already.
Now my option values e.g. look like this:
<option>The best massage you ever had – 90 minutes – 100 Euro</option>
What I need are seperate values for this option to work with them:
<option data-sectionid=”1″ data-massageid=”5″ data-massagetitle=”The best massage you ever had” data-massagetime=”90 minutes” data-massageprice=”100 Euro”>The best massage you ever had – 90 minutes – 100 Euro</option>
The section- and massageid are values I want to get from url to preselect the options. The other values are for building a preview of an voucher to dynamical fill html tags with them.
Forum: Plugins
In reply to: [Calculated Fields Form] Additional data-attributes to option elementsWell, I got about 100 elements. An other control field makes no sense here. Isnt there any other possibility to hack and crack it up to get it work somehow?
Forum: Plugins
In reply to: [Calculated Fields Form] Additional data-attributes to option elementsok. seems like option tags cant contain any other html tags. Do you have any other idea? I badly need this option somehow. My head is about to explode… :/
Forum: Plugins
In reply to: [Calculated Fields Form] Additional data-attributes to option elementssure
Forum: Plugins
In reply to: [Calculated Fields Form] Additional data-attributes to option elementsthanks but the output gets messed up then:
<option vt=”<span data-foo=’bar’ data-john=’doe’ data-bla=’some text to work with’>Lorem Ipsum Dolor</span>” value=”20″>Lorem Ipsum Dolor</option>
Forum: Plugins
In reply to: [Calculated Fields Form] URL params and dropdown dependenciesHi,
thanks, now the reselection works but then my set dependencies wont work. I think I′ll write my own dependency.
Just one last question: How can I use external scripts without writing them into html fields or hidden equations? I′m no expert in JS so I dont really understand why my external functions doesnt work.
Is there something like if (fbuilderForm) is loaded do my stuff ?
Thumbs up for your support!
Forum: Plugins
In reply to: [Calculated Fields Form] URL params and dropdown dependenciesThe sense is, that Im building a coupon-form. There are links on other pages where the user can click an offer (“use as a coupon”). There Im setting url params to have the coupon-type preselected:
https://www.domain.com/coupons/?category=Shoes&shoe=boots
Ive set up a test page where you can see the behaviour:
Forum: Plugins
In reply to: [Calculated Fields Form] URL params and dropdown dependenciesHi,
ok. I′ll try my best ?? The values are just exemplary but the principle stays the same:
First Selection: Field Type “Dropdown”. Class = “category”:
Choose your category: (every value has a dependency: if choosen display sub selection)
– Shoes (preselected)
– Food
– MoviesNow there′re sub selections for every category:
Sub Selection “Shoes”: Field Type “Dropdown”. Class = “shoes”:
Choose your shoe:
– sneaker (preselected)
– boots
– high heelsThen I have a calculated field for my function:
(function(){ jQuery('.category option[value="Food"]').prop('selected', true); })()
What happens is that in my category selection the value “Food” gets selected properly and my sub selection “Food” gets also displayed properly. When I now try to change the value in my category selection to “Shoes” or “Movies” the dependency fires properly so that my sub selections “Shoes” or “Movies” gets displayed. But the value “Food” stays selected in my category selection.
Forum: Plugins
In reply to: [Calculated Fields Form] URL params and dropdown dependenciesThanks, but this is something Ive already tried without success.
Still: the value gets selected properly but selecting an other value doesnt work as long they have dependencies on them. It always jumps back to “Red” (or whatever value is selected in function).
Forum: Plugins
In reply to: [Calculated Fields Form] URL params and dropdown dependenciesHi,
sorry, I cant share the link in public. But the code works as long as the selection doesnt have dependencies:
<select id="fieldname1_1" class="field depItemSel medium valid" name="fieldname1_1"> <option class="depItem" vt="Red" value="Red" selected="">Red</option> <option class="depItem" vt="Blue" value="Blue">Blue</option> <option class="depItem" vt="Green" value="Green">Green</option> </select>
(function () { jQuery('#fieldname1_1').val('Green').prop('selected', true); })()
Forum: Plugins
In reply to: [Theme My Login] Auto check remember me?just add ‘checked’ to the element:
<input name=”rememberme” type=”checkbox” id=”rememberme<?php $template->the_instance(); ?>” value=”forever” checked />
Forum: Plugins
In reply to: [WP Media Category Management] mcm_categories not visible in bulk dropdownHi Jan,
solved with latest version (1.8.2). Thanks for your support!
best
Forum: Plugins
In reply to: [WP Media Category Management] mcm_categories not visible in bulk dropdownHi Jan,
sry for my late reply. The problem occours on post.php when editing a custom post type. I solved the problem by adding
add_theme_support( ‘post-thumbnails’, array( ‘post’, ‘custom-type’ ) );
But now after updating to latest WP 4.4.1 and plugin version 1.8.1 an other “bug” occurs – the dropdown is hidden. Pls see screenshots:
https://s28.postimg.org/uaw37xrbh/shot.png
https://s28.postimg.org/s7lo09ril/shot1.png