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

    (@msimpson)

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    Michael Sorry i’m newbe and read that post but dont have any success.
    please show me example code that i must use..

    Plugin Author Michael Simpson

    (@msimpson)

    Try the example on the documentation page, but change “fname” to “mj1” and “lname” to “mj2”

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    i’m not foolish in all my life but i try this code:

    <form action="" method="POST">
    First Name: <input type="text" name="name" />
    Last Name: <input type="text" name="family" />
    <input type="submit" />
    </form>
    
    [cfdb-datatable form="mjform" filter="name~~/.*$_POST(name).*/i&&family~~/.*$_POST(family).*/i"]

    its my sample page and dont work:
    http://www.webamooz.ir/home/mj

    for example i dont want show all data in page just two input field for search FAMILYNAME and if its exist in table show the row .

    in the working scenario , my users search ali for NAME and navabi for FAMILY and get the row :

    ۱۳۹۳-۰۴-۲۶ ۱۵:۲۶:۲۷ P
    ali
    navabi
    09123332387
    admin
    213.207.229.95
    Plugin Author Michael Simpson

    (@msimpson)

    I looked at your page and I see a problem. When the form is submitted, it appears that the same page is not processing the submission. Let us forget about the short code for a moment. If you put a form on your page with action=”” then that form submits back to the same page. If I click on the submit button on your form, I should see the same page again with the same form. But I do no see the form. The page has the same URL, as I expect. But it looks like a different page is being displayed. The form is not displayed and the short code is never processed.

    I don’t know what causes this behavior. Perhaps it is the WordPress configuration or the WordPress theme.

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    Michael
    thank you i’m solved that problem,its WordPress reserved parameter like name – family and … i change my parameters and its look like working:

    http://www.webamooz.ir/home/mj

    but my problem is i need to show results if all two parameters FIRST-NAME and LAST-NAME exist in One row, (AND not OR) .
    is there any way?

    Plugin Author Michael Simpson

    (@msimpson)

    The && in the filter expression makes the constraint and AND. However if you leave one of the fields blank, the regular expression effectively accepts any value for that field.

    I set up this example for you to see. Try entering Your-Name “Michael Simpson” and Your Subject = “None”. You get 2 rows where both fields match.
    http://blog3.michael-simpson.com/?p=313

    I put a second short code using == instead of a regular expression (~~) for comparison.

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    thank you Michael
    i don’t have permission to see your site data but my problem now fixed and work Perfect .
    thank for your plugin i must read more your documents .

    :X

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    Michael
    i think i found a permissions bug in plugin,

    i setup my page :
    http://www.webamooz.ir/home/cert/
    password: webweb

    everything work fine when i logged in with Admin , but i need this search form to anyone , and based on Rule document , i changed Can See Submission when using short codes to Anyone and now when page load all data show to Anyone!
    and don’t need to search….

    Plugin Author Michael Simpson

    (@msimpson)

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    i’m confused again.

    i need Everyone can search and see data based on last scenario.

    but now everyone can see all data without search and the code don’t work perfectly for everyone.

    just work with Administrator roll.

    what setting i must change to ?

    when i setting all to Administrator, everything work for admin and everyone get permission error.

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    at now i used this for Short code:
    [cfdb-table form="StudentsForm" filter="MelliCode=$_POST(MelliCode)&&Cert-Number=$_POST(Cert-Number)"]
    and in admin panel set Can See Submission when using short code to Anyone.

    all seams good for Administrator ,but when refresh page without login(Anyone) i see all data in page 🙁 also search is not work with AND condition but at same time all is work for amdinistrator 🙁

    Plugin Author Michael Simpson

    (@msimpson)

    I have examined this. It is definitely a bug since version 2.8. I will release an update soon with a fix.

    Thread Starter Mohammad Jorjandi

    (@amoomj)

    Thank you Michael

    is there any chance to update it in next 2-3 days?
    or fix it for me before publicly update?
    i run this service for users and announce it 🙁

    Plugin Author Michael Simpson

    (@msimpson)

    I will update it today.

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

The topic ‘search on form’ is closed to new replies.