• Resolved whitetec

    (@whitetec)


    First of all, it is an excellent plugin with a lot of potential. Congratulations for that.

    I’m trying to restrict the editing of some form fields from the backend.

    We find the function created by the editor and conveniently is commented to add the field labels that we want to convert into NOT-EDITABLE.

    Occasionally line 791 of
    “wp-content / plugins / advanced-cf7-db / admin / class-advanced-cf7-db-admin.php”

    Where we find the following code:

    //// Define not editable fields name here
    public function vsz_cf7_not_editable_fields_callback () {
    $ cf7_not_editable_fields = array ('submit_time', 'submit_ip', 'submit_user_id', 'username-usr', 'nro-sum', 'menu_type_reclamo', 'texto-usr', 'correo-usr', 'tel-usr' );
    return $ cf7_not_editable_fields;
    }

    ——————
    As you can see we add the fields that we do not want to be edited, but we found a problem. For those fields that are of the INPUT type, the rule applies without problems, but for the fields of type TEXT or TEXT-AREA, this rule does not apply. It simply ignores them and lets them edit.

    What are we doing wrong?

    Thank you very much for your time. I look forward to an answer.

    Greetings, John.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vsourz Digital

    (@vsourz1td)

    Hi @whitetec,

    We would love to help you with your customization.
    Actually, you are very near to solve out your problem.

    you will need to look into “function vsz_cf7_after_admin_edit_values_form_callback($form_id)” in same admin page “admin/class-advanced-cf7-db-admin.php” which holds the edit record popup code.
    You need to track ‘$not_editable_field’ variable to check which type of fields are editable/non-editable.

    Plugin Author Vsourz Digital

    (@vsourz1td)

    Hello @whitetec,

    We have provided filters, to pass the non-editable fields in the back office. You can use “vsz_cf7_not_editable_fields” filter to pass the fields name that needs to be non-editable.

    If you have any other concern, feel free to contact us.

    Regards,
    Vsourz

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘(Admin side) Restrict edition in some fields.’ is closed to new replies.