Forum Replies Created

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

    (@lmarks)

    Thanks for explaining in further detail, it helps greatly in my understanding of your situation. I’m still a little unclear on what you’d be pre-populating a form with in a survey context. It sounds more like you’re establishing a membership DB of local orgs. Something where members can come back and update data as needed? If Gravity forms had saved the data, I’d expect it to pre-populate the form upon re-entry, provided it has adequate information to get the right record, such as a member ID established when they login. But I don’t know Gravity Forms, so IDK.

    It is a DB of organizations. They aren’t really members. The information is being collected so other organizations (government and other NGOs) can make referrals to them. Since I was thinking of the initial data collection I called it a survey, but it will be ongoing. Updating is an important aspect which is why pre-populating the fields is important.

    You are correct; I have realized the need for an organization ID, distinct from the identification of the person making the present update.

    In any case, as I said, doing an end run around it could work, as long as the right record can be fetched. Of course this requires custom coding, which would be a hindrance with limited access. You’d need to rely upon being able to add custom code by uploading a custom plugin through the WP admin UI.

    That’s a little more than I bargained for, but it would be an interesting skill to learn. I imagine it involves creating PHP, SQL, and HTML/javascript parts, zipping, and uploading. I would definitely want to start with a local setup for developing and testing if I did this.

    I don’t suppose you have access to phpMyAdmin either? It would easily export CSV data. It’ll contain all the null fields, but they could be eliminated in a post-export process. You can get the data and write it to a CSV using a custom plugin. At least this way your PHP script could eliminate null fields as they are encountered.

    Access to phpMyAdmin? 403 Forbidden :(. Interestingly, the Gravity Forms panel shows the stripped record (no Null fields) on display. I need to see if there’s documented access to it. The Gravity UI has an Export function that produces a user-selected set of records including all fields. Probably an API for that, too.

    I strongly suspect Gravity Forms saves data in postmeta table, which isn’t very efficient for large amounts of data. I’m not sure if it offers a more efficient alternative. I don’t think 55 different tables is necessary. I’d think a single custom table should suffice, but ideally you’d have some sort of county storage scheme that’s better than one field for each county. For example, save selected counties all in a serialized array within a single field. Null selections would not take up too much space, and if your own script was processing the data, it could eliminate null fields before saving.

    This may not be as inefficient as it first seems. The county fields are binary–represented by a single bit. There are about 3200 of them (My first statement, 4400, was repeating a bad estimate I was given.) 3200 bit fields corresponds to 100 32-bit words which doesn’t seem outrageous to me. Much of the other data is also binary. If you have time, check out the link. You might be surprised at the number of checkboxes and radio buttons.

    Once again, thank you for your perceptive comments.

    Thread Starter lmarks

    (@lmarks)

    Those are great questions.

    Where is the data coming from that you’d use to pre-populate the form? Unless it was initially saved by your Gravity form, you’ll likely need to customize the process (both getting and saving) outside of what Gravity Forms does by default. I’m guessing, I don’t use Gravity Forms.

    Gravity forms saves the data in the WordPress SQL database. If the first thing in the form is the Organization ID, three different ways are available to grab the prior record and pre-populate the rest of the form. It’s a little cumbersome and I am not sure I can do it with the limited access I have been allowed.

    You can likely override what Gravity Forms do for processing via JavaScript/jQuery. Have your script make appropriate Ajax or API requests to get or save data where ever it is being kept. In doing so, Gravity Forms isn’t of much use beyond generating the form’s HTML.

    Heh, heh. Pretty sure I can NOT script with my limited access.

    What are the .csv files going to be used for? While the format is useful for transferring data, it’s terrible for maintaining data. Data should be maintained in a proper relational database, preferably mySQL.

    Good question. The .csv will be exported and sent to the other guy in the other organization (currently a PhD at Texas A&M) who is importing it into an ArcGIS map for display. We have been discussing interchange formats and agreed on his recommendation, CSV.

    (He asked for deletion of all null columns, since 4400 counties makes this huge. I was originally going to simply do this with a PHP and MySQL script until I found they were off-limits. The deletion implies separate delivery of each record, since each would retain different columns. It’s also not a straightforward delete: the use-case is where an organization formerly filled a field and has deleted it in an update. Each column in the updated record must be compared with the prior record, and those empty columns that were formerly filled should be retained.)

    I originally wanted to include this process automatically any time someone completed an update. I had begun thinking I would have to export the entire database, select the updated record and it’s predecessor, and do the comparison/compression outside of WordPress (e.g., Excel or Access macro run locally).

    You should be able implement custom code on a site despite no FTP access by developing a plugin off-line, then zipping all the files and uploading from wp-admin/plugin-install.php. Just be sure it’s error free since you have little recourse if it crashes the site. If your WP user capabilities don’t allow this, achieving meaningful functionality could be a lost cause.

    Thank you for that hint. It appears that I DO have that access.

    IMO, a good UI for selecting counties would be similar to the tags UI in the post editor.

    I’m comfortable with my current UI. Please test it at https://www.ncvoad.org/nvoad-ltrg-coad-survey/ . You can put garbage in the other required fields. When you pick a state, that state’s counties (with checkboxes) will appear. (The user doesn’t have to scroll through a list of all ~4400 counties, just those of their own state.)

    What I was really asking, was rather than having 55 hidden lists, all on the same page/survey, would this have been better design to have branched to one of 55 separate surveys for counties, developing 55 different tables? This avoids the long-record problem at the expense of more complexity gathering the data. I’m not sure anyone here has the expertise to respond. This is simply a lot of data. It’s unlikely that we will get a 10-20% response but we have to build for a full response covering 4400 counties.

    Thank you very much for your insights.

    Thread Starter lmarks

    (@lmarks)

    I probably should have mentioned that in my first post. Because the developer has the license who developed the installations for National that were imposed on all the states , they will only support him, not me. Gravity has declined to provide support. I’m usually not permitted to contact the developer.

    National has butchered the management of this so badly I’m considering bailing out of the entire project.

    Well, this may not please you, but it would be a piece of cake for me: do the whole thing in raw HTML. I started doing web pages that way in 1995, built and maintain several websites. I just began learning WordPress a year ago.

    When your Word doc is done, do a global Replace All (Ctrl-H) changing ^p to </p><p>. Then save as .txt which will remove all other formatting. This will precede every paragraph with <p> and end it with </p>. Manually fix the beginning of the first paragraph and the end of the last one.

    Open the text file with e.g., Notepad and Copy it. Open the Classic Editor, press Ctrl-Alt-Shift-M to get to the HTML “Code” editor. Paste the file in and add the markup.

    For a few lines of computer code, use the <code> tag. This is usually like a separate paragraph.
    <p>Following is a simple program</p>
    <code>
    For I = 1 to 6
    Print I
    End For
    </code>

    For something the user types, use the <kbd> tag. This is usually short, in the middle of a paragraph.
    <p>After doing blah, blah, you will enter <kbd>my.exe -t -e -s -t </kbd> and then…</p>

    For output, the <samp> tag is used.
    <p>Message from my computer:</p>
    <p><samp>File not found.<br>Press F1 to continue</samp></p>

    HTH

    It worked fine for me. Remember that caching works differently when you are logged in as Admin.

    When I am testing something like this, I hit Ctrl-Shift-N to open a new Anonymous browser window so no cookies or local caching or Admin status are involved.

    HTH

    Thread Starter lmarks

    (@lmarks)

    Hi Maria,

    Thanks for taking the time to look at this. Here’s some background. We are a state chapter of a national organization. The national organization wanted all the chapters to have a common “modern look” and contracted a first firm to design new sites, a second firm to move the designs to a third firm that actually does the hosting.

    The third firm has denied me SFTP access and access in general to the file system, so I am pretty-well stymied. I believe the problem relates to an attempt to include a calendar from The Events Calendar plug-in onto the PMPro Portal page, but cannot prove it.

    The national organization has agreed to put me in touch with the first firm and they may be able to duplicate the problem on their staging system.

    Thank you for your assistance.

    Larry

    You could try pressing Ctrl-F5 and see if the correct data is then shown. If so, the problem is that the old data is cached in the browser’s cache.

    Thread Starter lmarks

    (@lmarks)

    Update to the above. After viewing descriptions of about two dozen WordPress file managers, I realized that the term “file manager” has special meaning in WordPress. Apparently most of these plugins are designed for people who don’t use FTP. I have no objection to using FTP. What I’m trying to do is make the viewer experience easy. Non-technical folks who use Windows or Mac know how to use a hierarchical file explorer. What I’m really looking for is a front-end plug-in.

    It should be read-only, and restricted to a certain directory and its subdirectories.

    Maybe that makes the problem simpler.

    Ugh. This editor has caused the same problem as the one I was asking about, so my examples are unreadable.

    The problem is that certain symbols, namely & l t ; and & g t ; (spaced out to avoid the editor making undesired changes) are being converted to angle brackets when the editor saves text. They should stored and maintained as entered and delivered to the viewer’s browser for conversion there.

    Mailto using long-form email addresses

    Be patient with me–I’ve been creating web pages in raw HTML since 1995, mostly without benefit of a CMS, but with occasional use of Drupal or commercial systems like MyClassOnline and ClubExpress. WordPress is a new experience. I’ve been tasked as a volunteer to move a website of 40 pages to WordPress. The site includes many sets of email addresses using mailto.

    The original specification for email structure, RFC-822, and later versions allow for short-form email addresses like <B>[email protected]</B> and for long-form addresses like <B>John Jones <[email protected]></B>.

    The complete long-form mailto looks like:
    “>Send mail to John
    The angle brackets for the long-form address are tricky. The outer set are HTML delimiters. The inner set are RFC-822 delimiters. If you enter it as above, the <A tag ends at the first > and “> appears as part of the clickable link.

    So instead, you enter the mailto: link as
    “>Send mail to John
    This has always worked for me in raw HTML and in Drupal. But it does not work in WordPress. The WordPress code editor “helpfully” changes the symbols to angle brackets.

    Am I doing something wrong, or is this a bug?

    Larry

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