Elxis CMS Forum

Support => General => Topic started by: bully on June 15, 2019, 10:32:47

Title: Elxis 5 - can't save a contact form
Post by: bully on June 15, 2019, 10:32:47
I just tried to make a simple html form, similar as before under elxis4, it doesn't save either as module and neither content.
here code, which refuses to safe, form tags get removed

Code: [Select]
<div class="msgcontainer">
<div class="row">
<div class="col-xl-8 offset-xl-2 py-5">
[color=red]<form action="" method="post">[/color]
<div class="messages">&nbsp;</div>

<div class="controls">

</div>

<div class="cbcb">Guest Details</div>

<div class="row">
<div class="col-md-6">
<div class="form-group"><label for="last_name">Last Name *</label> <input class="form-control" name="last_name" placeholder="Please enter your Last Name *" required="required" type="text" /></div>
</div>

<div class="col-md-6">
<div class="form-group"><label for="first_name">First Name *</label> <input class="form-control" name="first_name" placeholder="Please enter your First Name *" required="required" type="text" /></div>
</div>
</div>

<div class="row">
<div class="col-md-6">
<div class="form-group"><label for="email">Email *</label> <input class="form-control" data-error="Valid email is required." name="email" placeholder="Please enter your email *" required="required" type="email" /></div>
</div>

<div class="col-md-6">
<div class="form-group"><label for="alternates">Alternative contact; phone/email......*</label> <input class="form-control" name="alternates" placeholder="Please enter alternative your contact details *" required="required" type="text" /></div>
</div>
</div>

<div class="row">
<div class="col-md-12">
<div class="form-group"><label for="message">Message *</label><textarea class="form-control" name="msg" placeholder="Enter here further details as you might have OR none *" required="required" rows="4"></textarea></div>
</div>

<div class="col-md-12"><input class="btn btn-success btn-send" name="submit" type="submit" value="Send message" /></div>
</div>

<div class="row">
<div class="col-md-12">&nbsp;</div>
</div>
</div>
[color=red]</form>[/color]
</div>
</div>
</div>


No error, no nothing.

Anyone?

Part 2, related:

Until now, I used to copy/paste my php code for this form in the index.php
However, that makes it looking much more messy and complex. Ideally I would use something like:

Code: [Select]
<?php require('somefile.php');?>

But that fails badly. How it should be done correctly?

Bully
Title: Re: Elxis 5 - can't save a contact form
Post by: webgift on June 18, 2019, 09:09:21

Yeap that's true. Some of the html element has been restricted for security reasons.
Elxis have a pre-installed content plugin with name 'Contact form' and there is also a
complete extension with name AnyForm [1]. These extension will meet your
requirements.  Won't they?

[1]: https://www.elxis.net/edc/miscellaneous/142.html (https://www.elxis.net/edc/miscellaneous/142.html)
Title: Re: Elxis 5 - can't save a contact form
Post by: bully on June 18, 2019, 09:35:11
Hi webgift,

the standard contact form of elxis, is far away, from what I need. Have not really explored all those hidden options, but it looks to far away.
The module anyform, yes, I tried to install already, also not seeing it as installed, but it appears as disabled to install.
I have attached 3 screenshots

The code from me is only a sample code, I used ti figure out what or not does happen, as it looked not doing something. the real thing is a bit more complex, with a dynamic file upload and case numbers.

I don't the mind the anyform module, but it did in no version before ever help in doing my forms, so I am a bit surprised, that I need it now. However, I just can't be installed .... see screeny.

And no, I am not picking, I just try to find my way around now in elxis 5. For me it's like a beta test, before upgrading other sites, so I  really look and ask, what I can't figure out myself. I am aware, that I am not the brightest candle, but for that kind of idiots, I assume Elxis is made

Bully
Title: Re: Elxis 5 - can't save a contact form
Post by: webgift on June 18, 2019, 21:40:26

Anyform is a content plugin extension! It's not either module nor component!
Content plugins extends the functionality of articles or autonomous pages under
content component.

Content plugins replace a specific syntax to corresponding functionality per case.

Title: Re: Elxis 5 - can't save a contact form
Post by: bully on June 18, 2019, 22:04:17
ok,

but,
how I do get it to instakk/work somehowh?
Personally, I a, mot worried, if it is a module , plugin or whaterver (that was a post reply in before ..). All I need, how to. All I ned to figure out. get the (my) form working. .. Only the "saving part", I have the form itself working ... . I know, I can do this via direct edit in the db .... But I homestly look for the way, why or not, it refuses to work via old proven ways.

call me old fshion, but I need here here a working thing and I am honest. There are still a few few dozen crates of Vodka Hanoi time left, until ... but then I really need.. Until then, I can enjoy myself, but the form is an essential component (likely not in elxis terms) , but somehow, I need it working - in  a basic form, with the supplied minimum code. I sure not asking anyone to complete the dynamic attachments- that's my issue, but a simple form fiel should be possible to get the thing working.
Whoever and why  about ,might feel insulted ...a html5 form I would expect, to get working somehow!

I don't call it a bug, but it's not logic for me, neither helpful. If you ever the look at the screenies in the previous post, you might see, what I write about. I don't decide, where is whatever placed, neither what's called.
There is a fix, I will fix, there is tmp workaround, I will do. But ............................... ,I need to get at least a simple form working
/.
bully..... this about the point, I could get sour, but still smiing ;)
Title: Re: Elxis 5 - can't save a contact form
Post by: datahell on June 18, 2019, 22:29:31
1. If you don't want/can't write php code use plugin AnyForm. It is easy and you can create very complex forms.
2. If you can develop your own extension use the Elxis Form5 library with which you can do ANYTHING. I will guide you if you need help.

I guess you are on 1st category. So, AnyForm uses XML files to store forms. You declare your forms and the form fields there with syntax like that:

<item type="text" name="name" label="FIRSTNAME" required="1" default="{FIRSTNAME}" tip=""></item>

Once you end your form you can display it inside any article by integrating in the editor text area like this:
{anyform}myform{/anyform}

For easier integration you can use the Guided input mode in editor by clicking the Elxis icon button.

Full documentation is provided under a small fee from my site (https://www.isopensource.com/shop/software/11.html).

Title: Re: Elxis 5 - can't save a contact form
Post by: bully on June 18, 2019, 22:51:34
Hi webgift,

did you actually see r look at the the attachemnys?
whilst anyform is listed..., there is no real way for me to install it, as it shows installed, but nowhere listed?
maybe there is the cause?
I am not posting here to pick on anyone, but I just experience something, not looking logic (even I am not understanding all or most). I want to pick on someone, that will look a lot different, here, I just ask for guidance.
You tell me, I would need "anyform", fine. What appears for me?
just a bit different .. can happen. But sure, your explanations, don't seem to fit my little of basic understanding.
For tonight, it will be my last reply anyway (sry, I am drinking..). But that all is NOT working, neither makes any sense to me.
So, I need either a step-by-step to-do or a longer break, until maybe 1-2 days.
What I know for sure, It's working somehow, evene, if I must roll back to a 4.x. A simple stupid sample form, has to work. It does since elxis 2008 xx. Not even https://www.w3schools.com/html/html_forms.asp samples Not even the samples do it (in my installation)..
It's not abouit the php code, I still can place it in the index php, just looks it messy...even my style. Here we are taking simoly:
Not savibng the 'article/page/new module inside the elxis admin panel. If the php is the worry, I will ask ..., if a logo is the cause.. I will/did ask.
But herem I simply report: the admin panel is not saving the form, as mdole, content or article!

Sry for maybe spell shit, bcause I am drunk

bully
Title: Re: Elxis 5 - can't save a contact form
Post by: bully on June 19, 2019, 12:01:32
Yes, it's me again.
As content plugin, it's also not showing up
see attachment


I have now downloaded manually and attempted to install; instillation failed, ..exit

However, after this, the any_form appeared finally, despite refusal to install, as already installed

Now, I have at least a starting point, but a lot of posts for nothing. Cause: any_form showing installed, but nowhere showing.

As for now, I will start to figure out, what and how it might work

bully
Title: Re: Elxis 5 - can't save a contact form
Post by: datahell on June 19, 2019, 19:07:10
Maybe the installation was not completed successfully. If you wish send me with a private message access details to your site's administration section and FTP to install AnyForm and make a sample form for you.
Title: Re: Elxis 5 - can't save a contact form
Post by: bully on June 20, 2019, 02:35:57
After, I did attempt a manually installation, which failed, then it came up (visible).
I think actually, the xml form was already once before. if I remember right, in 2006 or 2009?

bully