• Resolved uwekersten

    (@uwekersten)


    Hello,

    I need help.

    how do I create on the thank you page an if query and then display the field (text or value) and a text and a picture.

    I would like to change radio, checkbox and dropdown fields by entering text fields. I found the following instruction.

    (Function () {
    var tmp = fieldname65,
    text = jQuery (‘[id * = “fieldname’ + ’65 _”]’). val (),
    radio = jQuery (‘[id * = “fieldname’ + ’43 _”]: eq (1)’);

    radio.attr (‘vt’, text);
    radio.closest (‘label’). contents (). filter (function () {
    return this.nodeType == 3;
    }). Each (function () {
    this.textContent = text;
    });

    }) ()

    she goes for checkbox and radio but not for dropdown. The screen display is not replaced but only expanded. where is the error in the ad.

    how does that work for dropdown?

    is that also possible for the values?

    many thanks for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @uwekersten,

    I’m sorry, but I’m not totally sure about the behavior you want implement.

    Could you send me the URL to the webpage where the form is inserted and describe the behavior you want to implement? no code, only a detailed description.

    Best regards.

    Thread Starter uwekersten

    (@uwekersten)

    Hello,

    there are two questions.
    1. I have
    <Script>
    if (‘<% fieldname4_value%>’ == ‘male’) document.write (‘Dear Sir’);
    else document.write (‘Dear Madam’);
    </ Script>

    inserted in the thank you page but it has no effect. if I only use … fieldname4 …. without query field 4 is also used. the problem is in the if query nothing is displayed.

    2. In the selection fields, I would like to be able to add either a selection (text and value). If that does not work I would like to be able to change the first selection (directly in the field or in additional input fields).

    https://www.seelenspiegel-bestattung.de/kostenkalkulator

    Changing the label at radio and checkbox would go with the mentioned code. I tried that. But that’s the right solution.

    I bought ccf on 01.06.18.
    user_2ba0dd30356155e541add8280

    Plugin Author codepeople

    (@codepeople)

    Hello @uwekersten,

    Why not simply insert a calculated field in the form to be used for salutation (fieldname123), configured as hidden, and with the equation:

    
    IF(fieldname4=='male', 'Dear Sir', 'Dear Madam')
    

    and then, you only should insert the tag for the value of the new field in the thank you page:

    
    <%fieldname123_value%> 
    

    Note that in the thank you pages you should define the summary into the corresponding shortcodes: [CP_CALCULATED_FIELDS_RESULT]...[/CP_CALCULATED_FIELDS_RESULT]

    Best regards.

    Thread Starter uwekersten

    (@uwekersten)

    ah, that works. Thank you.

    How can I get the latest version? with me WP is indicated that it is latest?

    I have one last question for the completion of my page.

    I work with a dropdown box.
    I already get text and value.
    (Function () {
    var tmp = fieldname39;
    return jQuery (‘[id * = “fieldname’ + ’39_”]
    . Option: selected ‘) text ();
    or … option: selected ‘). val (); …. so

    }) ()

    How do I get the selected number of the field. so first second third, etc is selected?

    Plugin Author codepeople

    (@codepeople)

    Hello @uwekersten,

    If you don’t have your download link, please, contact me through my private website:

    https://wordpress.dwbooster.com/contact-us

    If you want know the index of the option selected in the DropDown, the piece of code to use would be:

    
    var index = jQuery('[id*="fieldname'+'39_"] option:selected').index();
    

    Note that the index begin in zero (0)

    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘nwebie need help’ is closed to new replies.