• Resolved bctom

    (@bctom)


    Hello,
    I want creating a complex form with over 60 questions. Each question should have several answer options to choose from (with a click to a radio button). In addition, depending on the answers chosen, further answer variants should be possible for each answer (I have already used the dependency function to create the following cascade).

    Example:

    Question

    (Radio buttons)
    Answer 1 option 1
    Answer 1 option 2

    If Answer 1 is option 1 show:
    (Radio buttons)
    Answer B option 1
    Answer B option 2

    If Answer B is option 2 show a text field

    Now I come to my problem: I cannot determine whether it is possible to implement a text field that can be set in dependency to another field. I can’t find a dependency function in the settings for text fields.

    The text field itself should contain predefined text that the user can change. When the user has adjusted the text, the final text and the form should be able to saved.

    Finaly the form must be permanently visible and it must be possible to change it again if necessary.

    Since this form is located in a protected member area, it must be possible to save the results for each member individually.

    Is such a project possible with Calculated Fields Form?

    Warm greetings with the hope of help ??
    Thomas

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter bctom

    (@bctom)

    Sorry, I forgot: I’m using DIVI

    Greetins
    Thomas

    Plugin Author codepeople

    (@codepeople)

    Hello @bctom

    1. You cannot define dependencies with the text fields directly (activate some fields depending on the value entered by users in a text field). However, you can do it using an additional calculated field as an auxiliary.

    For example, assuming the fieldname1 is a text field, and you want to display the fieldname2 if the value entered by the user is great than 100. Insert a calculated field in the form with the equation: fieldname1 and define through its settings the dependency: if the value is great than 100, selecting the fieldname2 field from the list of dependent fields.

    More information about dependencies by reading the following post in the plugin’s blog:

    https://cff.dwbooster.com/blog/2020/03/01/dependencies/

    2. If you want to store the form’s submissions by users allowing them to access their information, you should enabling the “Users Permissions” add-on, and use the new shortcode provided by the add-on. More details in the following post of the plugin’s blog:

    https://cff.dwbooster.com/blog/2019/07/04/users-permissions

    Best regards.

    Thread Starter bctom

    (@bctom)

    Hello,

    Thank you for the feedback.
    Unfortunately this is far from a solution I am looking for. Is there perhaps a possibility to use the function “Populate the form B with the data submitted by the form A”? In my case this would also be on the same page and not on a thank you page as in the example.

    E.g. If I select an option (radiobutton) as an answer option, is it possible to display the value of the option in a field or something?

    Best regards
    Thomas

    Plugin Author codepeople

    (@codepeople)

    Hello @bctom

    If you want to use the value of the field in form A into a field in form B, both forms on the same page, you will need some additional code:

    1. Assign a custom class name to the field in form A, for example, field-a

    Note: the class names are assigned to the fields through their attributes: “Add CSS Layout Keywords”

    2. Assign a custom class name to the field in form B, for example, field-b

    3. Finally, in the form B insert an “HTML Content” field with the following piece of code (in the following code, I’m assuming the field in the form A is a radio button):

    
    <script>
    jQuery(document).on('change', '.field-a input', function(){
    jQuery('.field-b input').val(jQuery('.field-a input:checked').val()).change();
    });
    </script>
    

    Best regards.

    Thread Starter bctom

    (@bctom)

    Hello

    I have tested diligently, but without any result.

    My question: If field A (custom class “field-a”) in form A is a radio button and I want to use the selection (value) from field A in a field in form B (custom class “field-b”) – what type of field must field B be?
    Text field? or something else?

    In other words, form A only needs to contain the radio button field with the custom class name field-a.

    And in form B only 2 fields have to be:
    Field 1: “HTML CONTENT” with your script
    Field 2: “Textarea or something else” with the custom class name “field-b”

    Have I understood that correctly?
    kind regards
    Thomas
    ??

    Plugin Author codepeople

    (@codepeople)

    Hello @bctom

    Yes, the field in form B could be a text field, textarea, or any other control. Please, send me the link to the page with the forms to check your code.

    Best regards.

    Thread Starter bctom

    (@bctom)

    here it is ??

    https://inova.eco/dnk-1/

    Plugin Author codepeople

    (@codepeople)

    Hello @bctom

    The textarea fields do not include input tags, they use textarea tags. So, the code in the “HTML content” field would be:

    
    <script>
    jQuery(document).on('change', '.field-a input', function(){
    jQuery('.field-b textarea').val(jQuery('.field-a input:checked').val()).change();
    });
    </script>
    

    Best regards.

    Thread Starter bctom

    (@bctom)

    Hi,
    it works – GREAT JOB ??

    If I understand you correctly, I now need the developer version so that I can save the content separately for each user.

    And in the end, there is only one question left for me:

    I have to do the whole thing in a protected member area with payment function. Do you have any advice for me as to which WP plugin works best with your CFF?

    I took a look at Magic Members, but I can’t understand that and the support doesn’t even come close to your support.

    Can you give me a recommendation on this?

    Plugin Author codepeople

    (@codepeople)

    Hello @bctom

    The way you generate the users does not affect our plugin. If you insert the [CP_CALCULATED_FIELDS_USER_SUBMISSIONS_LIST] shortcode into a page, it will be replaced with the list of submissions corresponding to the registered user. Please, read the post I recommended you previously:

    https://cff.dwbooster.com/blog/2019/07/04/users-permissions

    Best regards.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘save text-entries in a member area’ is closed to new replies.