• Resolved Fabbstar

    (@fabbstar)


    Good evening,

    I hope you are well?

    I was wondering if the plugin allows users to send submitted data back to the form, like a ‘retrieve saved quote’ function.

    So, as I see it working, the logged in user submits a form.

    Later he goes to the form there is a link which allows him to retrieve the previously inputted data, which he can amend and re-submit.

    In short, i’d like a user to send data back to the form so they can tweak a field and then re-submit it.

    Any ideas?

    Thanks,
    Simon

    https://wordpress.org/plugins/calculated-fields-form/

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

    (@codepeople)

    Hi,

    I guess you are referring to the “Users Permissions” (or Users Connection) add-on, distributed with the Deverloper and Platinum versions of the plugin. Please, visit the following links:

    http://cff.dwbooster.com/documentation#users-addon

    http://cff.dwbooster.com/add-ons/users-permissions#begin

    Best regards.

    Thread Starter Fabbstar

    (@fabbstar)

    Ah yes!

    I activated the add-on and am using the shortcode so users can see and edit previous entries, fantastic job!

    Just a quick question, is there anyway we can avoid the pop up window when editing the entry?

    I ask as when users hit submit on my form they download a PDF, but the pop-up window prevents it from downloading.

    Is it possible for users to select ‘edit’ and either navigate without pop-up?

    Many thanks,
    Simon

    Thread Starter Fabbstar

    (@fabbstar)

    Perhaps just a new window instead of pop-up?

    Thread Starter Fabbstar

    (@fabbstar)

    I can see where the problem lies.

    How can I remove the ‘refresh url opener’ which is added to the pop-up url once the updated form is submitted?

    Thread Starter Fabbstar

    (@fabbstar)

    Cracked it! I removed this code from the users.addon.php file which was causing the popup to close before allowing the PDF to download:

    // Check for the existence of the ‘refresh_opener’ parameter
    if( isset( $_REQUEST[ ‘refresh_opener’ ] ) )
    {
    ?>
    <script>
    window.opener.location.reload();
    window.close();
    </script>
    <?php
    exit;
    }

    Thread Starter Fabbstar

    (@fabbstar)

    OK!

    Final request, for the new shortcode:

    [CP_CALCULATED_FIELDS_USER_SUBMISSIONS_LIST]

    Is it possible to wrap it around fields like so:

    [CP_CALCULATED_FIELDS_USER_SUBMISSIONS_LIST]
    <p><%fieldname13%></p>
    [/CP_CALCULATED_FIELDS_USER_SUBMISSIONS_LIST]

    I only want one or two fields to display, at the moment users can see all fields, even hidden.

    Many thanks,
    Simon

    Plugin Author codepeople

    (@codepeople)

    Hi Simmon,

    I’m sorry for the delay in respond to your questions, and thank you very much for sharing your solutions.

    In reality, in the current version of the add-on it is not possible select the fields to display in the list of submissions by users, would be needed customize the code of the add-on, specifically the piece of code:

    $str .= '
    </td></tr><tr>
    <td colspan="4" style="'.$cellstyle.'border-right:0;">'.str_replace( array( '\"', "\'", "\n" ), array( '"', "'", "<br />" ), $events[$i]->data );

    But the solution is not simple. If the feature is really important to your project, I can offer you a custom coding service through my private support page:

    http://cff.dwbooster.com/customization

    Best regards.

    Thread Starter Fabbstar

    (@fabbstar)

    Hey there,

    Thanks for your reply. Great support as ever.

    I see what you are saying. Is there nothing I can add to the above code to hide hidden field data?

    Failing this I will need to use your custom service as I do not want users to see hidden field data.

    The alternative is to hide the submission data altogether however I feel it will be difficult for the user to find entries they wish to edit/delete.

    Simon

    Plugin Author codepeople

    (@codepeople)

    Hi,

    In reality if you want to replace the some specific fields that you know their structure (labels and values). As they are hidden fields you know their labels and values, for example:

    If the field’s label is: Lorem ipsum, its value: 34, and it is displayed in the summary as:

    Lorem ipsum: 34

    You simply should modify the previous code as follows:

    $str .= '
    </td></tr><tr>
    <td colspan="4" style="'.$cellstyle.'border-right:0;">'.str_replace( array( '\"', "\'", "\n", "Lorem ipsum: 34" ), array( '"', "'", "<br />", "" ), $events[$i]->data );

    and that’s all.

    Best regards.

    Thread Starter Fabbstar

    (@fabbstar)

    Hi there,

    Thanks again for the reply. Yes I tried that however the value varies with every submission.

    I have put a display:none in the above <td> for now, so no data shows.

    One very last question, which code can I edit so the date and time of entry displays in this format: HH:MM DD-MM-YYYY

    Many thanks again,
    Simon

    Plugin Author codepeople

    (@codepeople)

    Hi Simon,

    If you don’t know the specific value of the field, but you know its structure, you can use the preg_replace function to use regular expressions to define the replacement, instead of a literal text.

    http://php.net/manual/en/function.preg-replace.php

    About your second question, the date is inserted by the piece of code:

    <td style="'.$cellstyle.'">'.substr($events[$i]->time,0,16).'</td>

    You can use the date function to modify its format.

    http://php.net/manual/en/function.date.php

    Best regards.

    Thread Starter Fabbstar

    (@fabbstar)

    Hi there,

    Sorry – me again.

    Thanks very much for your help once more.

    With regards to the date/time format, why is this not working?

    <td style=”‘.$cellstyle.'”>’.substr($events[$i]->d – m – y).'</td>

    Thanks,
    Simon

    Thread Starter Fabbstar

    (@fabbstar)

    Don’t worry, I worked it out. It was:

    date_format(date_create(substr($events[$i]->time,0,16)), ‘H:i d/m/Y’)

    Thanks again,
    S

    Thread Starter Fabbstar

    (@fabbstar)

    Very last question, does the list of entries paginate or is it one long list?

    Thanks,
    S

    Plugin Author codepeople

    (@codepeople)

    Hi,

    I’m sorry, the current version of the add-on includes a long list, but I promise to implement the pagination in the next update.

    Best regards.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Allow user to retrieve a saved form’ is closed to new replies.