frm-field-value field_id=336 truncate=10

By: Massimiliano Mollo | Asked: 05/04/2022
ForumsCategory: General questionsfrm-field-value field_id=336 truncate=10
Massimiliano Mollo asked 3 years ago

hi,
i need to cut date and time from one field,the field 336 are in this way:
07/05/2022 9:00 (CEST)
for date is OK with this:
[frm-field-value field_id=336 truncate=10 more_text=""]
result 07/05/2022

 

i try also javascript after on  the "After Fields" section of your Form Settings,but not work!

<script>

jQuery( document ).ready( function ( $ ) {

var sourceField = '#field_gsl0z';  //replace wjque with your source field key

var destinationField = '#field_74swx';//replace iyhhr with your destination field key

$( sourceField ).change( function () {

var sourceValue = $( sourceField ).val();

var truncated = sourceValue.substring( 10, 4 );//replace 2 with the index where you want to stop truncating

$( destinationField ).val( truncated );

$( destinationField ).change();

} );

} );

</script>

But now i need to keep only time
any help?

Bobby Clapp replied 3 years ago

Please see my post in the other thread where you ask a similar question. If you are posting similar questions, please try and keep them contained in a single post. Having someone who is trying to help jump around makes support difficult.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right